Cascade Driver for Hilscher Fieldbus CIF Cards: Version 4.1
Prev |  | Next

# cifTelegram

cifTelegram -- provides formatted access to the CIF message data interface.

## Synopsis

    (cifTelegram card_id rcv_task snd_task cmd ext fmt_string parse_string [args ...])

## Parameters

`card_id`

  The target card ID (`0..3`).

`rcv_task`

  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.

`snd_task`

  The sending task id, normally `16` (the HOST user), but may be dependent on the protocol and specific function.

`cmd`

  The message command specifier, as defined for the particular protocol and function.

`ext`

  The message command specifier extension, if required by the command.

`fmt_string`

  A string describing how to map the supplied parameters to the appropriate binary message. See the cifTelegramFmt command for details of this synopsis.

`parse_string`

  A string describing how to map the binary response message into a set of ASCII parameters. See the cifTelegramFmt command for details of this synopsis.

`args`

  Command-dependent list of parameters.

## Returns

        (cifTelegram card_id return_value)

where `return_value` depends on the message response and `parse_string`; or one of the following errors:

        (error "cifTelegram DR_ERR_DEV_INVALID (time) invalid device: card_id")

        (error "cifTelegram -1 (time) formatBinBuffer format_error_msg")

        (error "cifTelegram -1 (time) createBinFormat format_error_msg")

        (error "cifTelegram -1 (time) messageError message_error_code")

        (error "cifTelegram -1 (time) replyMailboxError device_error_code")

        (error "cifTelegram -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:
        (cifErrorDescription error_code)

## Description

This command provides access to the CIF message data interface. It creates a binary message based on the supplied format string and parameters, sends the message to the CIF card, and creates an ASCII response from the binary response message according to the supplied parse control string.

The CIF message interface provides access to many items of data not available through the card's shared memory interface. This includes the shared memory data itself, card commands and diagnostics, and access to fieldbus device data that is not transmitted as part of the process data image. This fieldbus data is sometimes referred to as explicit messaging or device attributes, and generally takes the form of slower variable length packets that are interspread with the deterministic fieldbus packets of process data.

The parameters of this command are completely dependent on the various functions available for the different protocols. The format and parse control strings must be precise, and can become quite complex. To facilitate use, a set of protocol-specific commands have been defined using the type command. For example, the `dnm.cfg`, `ibm.cfg`, and `prf.cfg` files contain command definitions for most of the functions available for the deviceNet, interBus and profibus protocols respectively. The synopsis for these commands is described by the associated description string (typeDesc), and these commands are made available to the driver by using the include `filename` command in the configuration file.

## Example

See the examples in cifTelegramFmt and protocol-specific configuration files.

Prev | Home | Next
cifDownloadCfg | Up | cifTelegramBin

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.