The interface to receive status data value changes for both host and equipment.
This event notifies your application of state value changes.
Possible
name values include:
- state
- the
State
property value changed
- clock_offset
- the number of seconds added to the system clock to provide CLOCK
variable values for the host. If the value differs from 0, the
host has used S2F31 to set the clock. Your logic can work with
host specified time values by adjusting the system time using this
offset value, or by reading the CLOCK variable using VariableGet().
We recommend that you avoid this complexity by instructing your customers
to use NTP time synchronization and that you disable S2F31 using
MessageTypeRemove().
- comm_state
- the CommState property value changed. See
SecsConn.getCommState()
.
- control_state
- the ControlState property value changed. See
SecsConn.getControlState()
- dataset_delete
- The host sees this event when a previously uploaded process program has
been replaced with a newly received one. Stream 13 messages
were used for the transfer. The newvalue argument is the ppid.
- dataset_download
- A process program has been downloaded from the host using Stream 13
transfer messages. For the equipment, the newValue argument is a two item list,
the ppid, and the pathname to the newly received file. For the host, the value is
the ppid. The host sees this
event when the S7F29 length verification message is received with the correct
length specified.
Use TclList.listElement or the TclList split method to parse the list.
See
processProgramLargeRequest
for the
discussion of downloaded files.
- dataset_upload
- A process program was successfully transmitted to the host
using Stream 13 transfer messages. The newValue argument
is the ppid. Both the equipment and host see this event at the successful
conclusion of a transfer.
- event
- this value changes when a data collection event is posted either by
equipment application logic calling the
eventPost
method, or by the built-in SECS server equipment logic.
The newValue argument is a two item list, the CEID of the event,
and a 1 or 0 indicating whether an event report message was sent or not.
A report is not sent or spooled if communication is disabled, or
if the event type is disabled, or if the control state is offline.
Also, when spooling is active, the event report may not be spooled.
- recipe_delete
- a process program was deleted or replaced with a
newly transferred version using Stream 7 transfer messages.
- recipe_download
- a process program was downloaded from the host to the equipment
using Stream 7 transfer messages.
- recipe_upload
- a process program was transmitted to the host from the
equipment using Stream 7 transfer messages.
- spooling_state
- For equipment, the spooling state, ACTIVE or INACTIVE.
- SpoolCountActual
- For equipment, the number of SECS messages currently spooled
- SpoolCountTotal
- For equipment, the total number of messages spooled and/or discarded
- SpoolMax
- For equipment,the configured maximum number of spooled messages
- SpoolStreamFns
- For equipment, the list of Ss, SsFf message types that configured for spooling
Your application gets notified of the initial values of these items
when the SecsEquip connection type is initialized. With the recipe_* events,
the newValue string is the process program identifier (ppid).
Use the onStateChange
method to set your own handler.
The return value is the previous handler which you are replacing.