Main Page | Data Structures | File List | Data Fields | Globals

cctalk-operations.h File Reference


Detailed Description

cctalk operations header file

Author:
Rod Boyce
Date:
18/10/04
Defined here are definitions for a cctalk operation. The struct tsCCTALK_STANDARD_PACKET can be used to reference the members of a cctalk packet. When using 16-bit CRC cctalk packets the define CRC16 will provide easy access to the CRC value for checking for a valid CRC. A complete cctalk operation is defined by the structure tsCCTALK_OPERATION this structure allows a developer to perform cctalk operations with one step. When opening a cctalk channel the speed of the channel needs to be specified this is done with the teCCTALK_SPEED enum.

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  tsCCTALK_STANDARD_PACKET
 These are the definitions of a cctalk packet header. More...

struct  sCCTALK_OPERATION
 This is how the user does cctalk communications. More...


Defines

#define CCT_PKT_OVERHEAD   ((eCCT_HEADER_SIZE)+(eCCT_CSUM_SIZE))
 The size of the cctalk packet header and checksum.

#define CHECKSUM_HI_BYTE(x)   ((x)->abData[(x)->bSizeOfData])
 When using CRC packets these defines will read the CRC.

#define bCrc16Lsb   bSourceAddr
#define CRC16(x)   ((CHECKSUM_HI_BYTE((x))<<8)|(x)->bCrc16Lsb)

Typedefs

typedef sCCTALK_OPERATION tsCCTALK_OPERATION
 This is how the user does cctalk communications.


Enumerations

enum  eCCT_OPERATION { eCCT_CSUM_SIZE = 1, eCCT_HEADER_SIZE = 4, eCCT_MAX_PACKET_SIZE = 256 }
 These are cctalk operation constants. More...

enum  teCCTALK_SPEED { eCCTALK_SPEED_SLOW, eCCTALK_SPEED_NORMAL }
 Set the speed of the cctalk bus. More...


Define Documentation

#define CCT_PKT_OVERHEAD   ((eCCT_HEADER_SIZE)+(eCCT_CSUM_SIZE))
 

The size of the cctalk packet header and checksum.

The number of bytes in a cctalk packet that is overhead and not packet data. This is also the minimum packet size of a cctalk packet.

#define CHECKSUM_HI_BYTE  )     ((x)->abData[(x)->bSizeOfData])
 

When using CRC packets these defines will read the CRC.

The only user-serviceable define is CRC16 and it returns the 16-bit CRC of the packet pointer (x) FIXME: This needs to be tested there may need to be some casts sprinkled around here.


Typedef Documentation

typedef struct sCCTALK_OPERATION tsCCTALK_OPERATION
 

This is how the user does cctalk communications.

This structure is passed around inside the cctalk module. The user will fill out the structure with the Tx packet length. The maximum time this transaction is expected to take in mS. The biggest expected Rx packet size returned. Then send this cctalk operation to the cctalk module for it to be queued to be sent over the cctalk communications bus.


Enumeration Type Documentation

enum eCCT_OPERATION
 

These are cctalk operation constants.

These constants are used by cctalk operations when dealing with a complete cctalk operation.

Enumeration values:
eCCT_CSUM_SIZE  The number of bytes added to the end of a packet
eCCT_HEADER_SIZE  This is the size of a header in a simple cctalk packet
eCCT_MAX_PACKET_SIZE  Maximum packet size of a cctalk packet

enum teCCTALK_SPEED
 

Set the speed of the cctalk bus.

These defines are used to specify the speed of the cctalk bus slow is 4800 and normal is 9600

Enumeration values:
eCCTALK_SPEED_SLOW  cctalk speed slow 4800 baud
eCCTALK_SPEED_NORMAL  cctalk speed normal 9600 baud


Generated on Thu Jan 20 16:12:03 2005 for Axis cctalk sub-system by doxygen 1.3.6