External Interfaces Previous page   Next Page

Storing Event Information

You can store event information in a callback function or in a record file. Event information is stored in a callback function using two fields: Type and Data. The Type field contains the event type, while the Data field contains event-specific information. As described in Creating and Executing Callback Functions, these two fields are associated with a structure that you define in the callback function header. Refer to Debugging: Recording Information to Disk to learn about recording data and event information to a record file.

The event types and the values for the Type and Data fields are given below.

Table 10-10: Event Information 
Event Type
Field
Field Value
Break interrupt
Type
BreakInterrupt
Data.AbsTime
day-month-year hour:minute:second
Bytes available
Type
BytesAvailable
Data.AbsTime
day-month-year hour:minute:second
Error
Type
Error
Data.AbsTime
day-month-year hour:minute:second
Data.Message
An error string
Output empty
Type
OutputEmpty
Data.AbsTime
day-month-year hour:minute:second
Pin status
Type
PinStatus
Data.AbsTime
day-month-year hour:minute:second
Data.Pin
CarrierDetect, ClearToSend, DataSetReady, or RingIndicator
Data.PinValue
on or off
Timer
Type
Timer
Data.AbsTime
day-month-year hour:minute:second

The Data field values are described below.

The AbsTime Field.   AbsTime is defined for all events, and indicates the absolute time the event occurred. The absolute time is returned using the clock format.

The Pin Field.   Pin is used by the pin status event to indicate if the CD, CTS, DSR, or RI pins changed state. Refer to Serial Port Signals and Pin Assignments for a description of these pins.

The PinValue Field.   PinValue is used by the pin status event to indicate the state of the CD, CTS, DSR, or RI pins. Possible values are on or off.

The Message Field.   Message is used by the error event to store the descriptive message that is generated when an error occurs.


Previous page  Event Types and Callback Properties Creating and Executing Callback Functions Next page

© 1994-2005 The MathWorks, Inc.