Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This structure contains the configuration informations for a signal. A signal represents a piece of information within the application (a single bit, a bitfield, a integer value, etc...).

Members


typedef struct {

...

CPU_INT08U Status;

CPU_INT08U Width;


    CPU_INT08U       Status;
    CPU_INT08U       Width;
    CANSIG_VAL_T     Value;

...


    CANSIG_CALLBACK  CallbackFct;

...


} CANSIG_PARA;

Member

Meaning

Status

This member holds the initial status of the signal. This status will be copied to the signal status during initialization phase by calling CanSigInit().

Width

This member holds the width of the signal in bit in range 1..32 or in byte (1,2, or 4).

Note: Interpreting the width of the signal in bit or byte depends on the configuration setting CANSIG_GRANULARITY

Value

This member holds the initial value of the signal. This value will be copied to the signal value during initialization phase by calling CanSigInit().

CallbackFct

This member holds the function pointer to the callback function, which is called during a signal write or a read event. The function must have the following Prototype:

void Func (void *, CANSIG_VAL_T *, CPU_INT32U);

The first parameter is used as a pointer to the actual signal.

The second parameter is a pointer to the actual write-value. In case of a read-event it is set to 0.

The third parameter is used to identify the event type (see below).

...

Event type Id

Meaning

CANSIG_CALLBACK_READ_ID

The callback-function is called from the signal read function.

CANSIG_CALLBACK_WRITE_ID

The callback-function is called from the signal write function.

...