event_register_appl
Registers for an application event. Use this Tcl command extension to run a policy when an application event is triggered following another policy’s execution of an event_publish Tcl command extension; the event_publish command extension publishes an application event.
In order to register for an application event, a subsystem must be specified. Either a Tcl policy or the internal Embedded Event Manager (EEM) API can publish an application event. If the event is being published by a policy, the sub_system argument that is reserved for a policy is 798.
Syntax
event_register_appl [tag ?] sub_system ? type ? [queue_priority low|normal|high|last] [maxrun ?] [nice 0|1]
Arguments
tag |
(Optional) String identifying a tag that can be used with the trigger Tcl command extension to support multiple event statements within a Tcl script. |
||
sub_system |
(Mandatory) Number assigned to the EEM policy that published the application event. The number is set to 798 because all other numbers are reserved for Cisco use. If this argument is not specified, all components are matched. |
||
type |
(Mandatory) Event subtype within the specified event. The sub_system and type arguments uniquely identify an application event. If this argument is not specified, all types are matched. If you specify this argument, you must choose an integer between 1 and 4294967295, inclusive. There must be a match of component and type between the event_publish command extension and the event_register_appl command extension in order for the publishing and registration to work. |
||
queue_priority |
(Optional) Priority level at which the script will be queued:
If more than one script is registered with the "queue_priority_last" argument set, these scripts will execute in the order in which the events are published.
If this argument is not specified, the default queuing priority is normal. |
||
maxrun |
(Optional) Maximum run time of the script (specified in SSSSSSSSSS[.MMM] format, where SSSSSSSSSS must be an integer representing seconds between 0 and 4294967295, inclusive, and where MMM must be an integer representing milliseconds between 0 and 999). If this argument is not specified, the default 20-second run-time limit is used. |
||
nice |
(Optional) Policy run-time priority setting. When the nice argument is set to 1, the policy is run at a run-time priority that is less than the default priority. The default value is 0. |
If multiple conditions exist, the application event will be raised when all the conditions are satisfied.
Result String
None
Set _cerrno
No
Event_reqinfo
Event_reqinfo
"event_id %u event_type %u event_type_string {%s} event_pub_sec %u event_pub_msec %u"
"sub_system 0x%x type %u data1 {%s} data2 {%s} data3 {%s} data4 {%s}"
Event Type |
Description |
---|---|
event_id |
Unique number that indicates the ID for this published event. Multiple policies may be run for the same event, and each policy will have the same event_id. |
event_type |
Type of event. |
event_type_string |
An ASCII string that represents the name of the event for this event type. |
event_pub_sec event_pub_msec |
The time, in seconds and milliseconds, when the event was published to the Embedded Event Manager (EEM). |
sub_system |
Number assigned to the EEM policy that published the application event. Number is set to 798 because all other numbers are reserved for Cisco use. |
type |
Event subtype within the specified component. |
data1 data2 data3 data4 |
Argument data that is passed to the application-specific event when the event is published. The data is character text, an environment variable, or a combination of the two. |