Back to Schedule Commands
CMD_SCHED_TX

Command:              CMD_SCHED_TX 
Destination:          SD_SCHED
Destination Channel:  Channel ID

Description

Clients use this command to transmit messages over the channel specified in the frame header's destination channel field. Unlike the CMD_CARD_TX command, this command allows users to specify additional transmit options (e.g. the number of iterations, transmit intervals, etc.). Users can also create a list of messages to transmit. If scheduling of the command(s) is successful, the transmit schedule ID number is returned in the command response. The schedule ID number is used for all future transactions related to the actions initiated by this command. Once the requested transmissions are complete, the client is sent an event notification frame (EVENT_SCHED_DONE) confirming that the scheduled transmission has completed. After the event notification is sent, the transmit schedule ID number is invalid.

Command data format

The message data is formatted as follows:
Iterations Flags Message List
4 bytes (unsigned long) 4 bytes 1..n frames

Iterations

The number of iterations of the list. (A value of 0xFFFF FFFF indicates the maximum number of iterations possible.)

Flags

Specify various transmit schedule attributes. The various bit values determine distinct behaviors.

Currently no bits are being used. To allow for future use, all bits should be cleared (set to zero).

Message List

The list of messages to be scheduled. Each element in the list has the following format:

SleepValue TransmitCount TransmitPeriod Flags Channel (reserved) Message
4 bytes 4 bytes 4 bytes 2 bytes 1 byte 1 byte (size of message)

Sleep Value:
Number of milliseconds to wait before transmitting this message TransmitCount number of times. The first SleepValue of the first element of the Message List may be skipped by setting a bit in the flag word as described below.

TransmitCount:
Number of times to transmit this message.

TransmitPeriod:
Interval (in milliseconds) to wait after each transmission of this message. The interval following the last transmission of this message may be skipped by setting a bit in the flag word as described below.

Flags:
Bit 0: Set = skip the last TransmitPeriod       Reset: Do not skip the last TransmitPeriod
Bit 1: Set = skip the first SleepValue of the first element of the Message List       Reset: Do not skip any SleepValues
Bit 2: Set: Period specified in microseconds. Reset: Period specified in milliseconds.
Bits 3 through 15: for future use (Best to set to zero, for future compatibility)

Channel:
0 = message is sent to the default channel as specified by the Destination Channel
1-255 = message is sent to the channel indicated

Message:
Message frame. (See CMD_CARD_TX for the format of this frame.)

Response data format

The response data format is as follows:

Transmit Schedule ID
4 bytes (unsigned long)

Response return codes
RESP_OK Execution of the command was successful. (The response data will have a 4-byte Transmit Schedule ID.)
RESP_INVAL_CHAN The specified channel is invalid.
RESP_UNSUPPORTED This command is not supported on the specified channel.
RESP_INVAL_MSG The specified message(s) is not a legal message for this protocol.
RESP_INVAL_LEN The specified data size is not legal.
RESP_TX_FAIL An attempt to transmit failed.
RESP_UNREG The specified source channel is not registered with the server.
RESP_UNKNOWN_ERR An unknown error occurred.


|Top|