cifTelegramBinSend — sends a telegram, and returns immediately without waiting for a reply.
(cifTelegramBinSend card_id rcv_task snd_task cmd ext ascii_hex_string)
The target card ID (0..3).
The ID of the target CIF firmware task that is to process the message. This value is protocol-dependent. Different message functions are available through the various target tasks.
The sending task id, normally 16 (the HOST user), but may be dependent on the protocol and specific function.
The message command specifier, as defined for the particular protocol and function.
The message command specifier extension, if required by the command.
The content of the message as a string of ASCII-encoded hex digits.
This specifies the content of the message itself (header + data); the message interface header (the first 8 bytes) is automatically created from the other supplied parameters. |
(cifTelegramBinSend card_id return_value)
where return_value depends on the message response, or one of the following errors:
(error "cifTelegramBinSend DR_ERR_CARD_INVALID (time) invalid card: card_id") (error "cifTelegramBinSend -1 (time) messageError message_error_code") (error "cifTelegramBinSend -1 (time) sendMailboxError device_error_code")
The text string corresponding to the message_error_code and device_error_code can be obtained by issuing an errorDescription command, like this: (errorDescription error_code) |
This command is similar to cifTelegramBin, except that it it does not wait for a reply.
If your system generates unsolicited telegrams, you cannot use cifTelegramBin. That command sends a telegram and then returns the next available response from the queue. It assumes that the CIF card is the only device on the network that will initiate a telegram message.
In contrast, when you use cifTelegramBinSend to transmit a telegram, the response is received by cifTelegramBinReceive, which you must use as well. These functions are logically equivalent to using devPutMessage and devGetMessage from the Hilscher API.
Like cifTelegramBin, the message content must be specified as ASCII encoded hex digits, and the resulting binary message is likewise encoded as ASCII hex. The ascii_hex_string parameter encodes the data as a sequence of two-character hexadecimal numbers. For example, if the data is (decimal):
255 1 47 7
then ascii_hex_string would be:
FF012F07
See the cifTelegram command for more information about messages.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.