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

cctalk-channel.h File Reference


Detailed Description

This is the header for the cctalk channel functions.

Author:
Rod Boyce
Date:
20/10/04

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

Included by dependency graph

Go to the source code of this file.

Enumerations

enum  teCCTALK_ERRORS {
  eCCTALK_SUCESS, eCCTALK_CH_BUSY, eCCTALK_CANNOT_OPEN, eCCTALK_CH_NOT_OPEN,
  eCCTALK_CH_NO_RPLY, eCCTALK_CH_NO_DATA, eCCTALK_CH_FAILED, eCCTALK_END_OF_ERRORS
}
 cctalk errors codes returned by most cctalk channel functions More...


Functions

teCCTALK_ERRORS cctalk_UseSocket (char *pacSocketName)
 Called before open to use named socket instead of the default.

teCCTALK_ERRORS cctalk_OpenChannel (teCCTALK_CHANNEL eCctCh, teCCTALK_SPEED eCctSpd)
 Open a cctalk channel for communication.

teCCTALK_ERRORS cctalk_QueueOperation (teCCTALK_CHANNEL eCctCh, tsCCTALK_OPERATION *psCctOp)
 Called to perform cctalk transactions.

teCCTALK_ERRORS cctalk_ReceiveOperation (teCCTALK_CHANNEL eCctCh, tsCCTALK_OPERATION *psCctOp)
 Receive completed transactions from a cctalk channel.

teCCTALK_ERRORS cctalk_CloseChannel (teCCTALK_CHANNEL eCctCh)
 Called to close a cctalk channel.

char * cctalk_StrError (teCCTALK_ERRORS eCctError)
 Get error string based on error code.

teCCTALK_ERRORS cctalk_ChannelStatus (teCCTALK_CHANNEL eCctCh)
 Is there any cctalk operation for this channel.

teCCTALK_ERRORS cctalk_ForceCloseChannel (teCCTALK_CHANNEL eCctCh)
 Force closure for the cctalk channel.

teCCTALK_ERRORS cctalk_CommandServerToExit (void)
 Send a command to the server to tell it to Exit nicely.

unsigned char cctalk_SimpleChecksum (unsigned char *pacData, unsigned char bLen)
 return the simple checksum of a packet


Enumeration Type Documentation

enum teCCTALK_ERRORS
 

cctalk errors codes returned by most cctalk channel functions

Enumeration values:
eCCTALK_SUCESS  The command completed successfully and everything was OK
eCCTALK_CH_BUSY  The channel is busy eg already open
eCCTALK_CANNOT_OPEN  The channel cannot be opened
eCCTALK_CH_NOT_OPEN  returned if channel close was call but the channel was not open
eCCTALK_CH_NO_RPLY  The server did not reply to the client in time
eCCTALK_CH_NO_DATA  The there was no data for the server to send back to the client on a cctalk channel
eCCTALK_CH_FAILED  This action failed for some reason
eCCTALK_END_OF_ERRORS  The number of error codes returned by the channel system


Function Documentation

cctalk_ChannelStatus teCCTALK_CHANNEL  eCctCh  ) 
 

Is there any cctalk operation for this channel.

This function is called to see if there are any cctalk operations either queued to be send to the cctalk device or waiting for the client to receive the completed cctalk operation.

Date:
05/11/04
Author:
Rod Boyce.
Parameters:
eCctCh - Channel to get the status of.
Returns:
eCCTALK_CH_BUSY if there is data waiting to be send or received and eCCTALK_CH_NO_DATA if there is no data waiting for this cctalk channel

History

Here is the call graph for this function:

teCCTALK_ERRORS cctalk_CloseChannel teCCTALK_CHANNEL  eCctCh  ) 
 

Called to close a cctalk channel.

When a user has finished using a cctalk channel the close channel fn is called to close the channel. a check is made to confirm that all transactions have finished and the channel is then closed.

Date:
19/10/04
Author:
Rod Boyce
Parameters:
eCctCh - The channel to perform this action on.
Returns:

History

Here is the call graph for this function:

cctalk_CommandServerToExit void   ) 
 

Send a command to the server to tell it to Exit nicely.

Date:
09/11/04
Author:
Rod Boyce
Returns:
eCCTALK_SUCESS is returned by the client when the channel is closed

History

Here is the call graph for this function:

cctalk_ForceCloseChannel teCCTALK_CHANNEL  eCctCh  ) 
 

Force closure for the cctalk channel.

This code is called when the client want to force the closure of a cctalk channel. A message is sent to the server to force the closure of a cctalk channel.

Date:
05/11/04
Author:
Rod Boyce.
Parameters:
eCctCh - Channel to force closed.
Returns:
eCCTALK_SUCESS is returned by the client when the channel is closed

History

Here is the call graph for this function:

teCCTALK_ERRORS cctalk_OpenChannel teCCTALK_CHANNEL  eCctCh,
teCCTALK_SPEED  eCctSpd
 

Open a cctalk channel for communication.

Open a cctalk channel for communication with the device(s) on this cctalk channel. There many be more than one device here. This routine is not concerned with auto discovery the devices must already be known on this channel.

Date:
19/10/04
Author:
Rod Boyce
Parameters:
eCctCh - The cctalk channel to open
eCctSpd - The speed to communication over this channel with
Returns:
see enum teCCTALK_ERRORS for error code definitions

History

Here is the call graph for this function:

teCCTALK_ERRORS cctalk_QueueOperation teCCTALK_CHANNEL  eCctCh,
tsCCTALK_OPERATION psCctOp
 

Called to perform cctalk transactions.

A cctalk operation consists of a packet to transmit, a reply packet, the maximum size of the expected reply packet, how long to wait for the reply packet, and the size of the TX packet. The format of the packet can vary depending on, if an addition checksum, a CRC16 checksum, or if encryption is being used on the wire. This interface provides a conduit for transactions but the end developer must format the packets correctly.

Date:
19/10/04
Author:
Rod Boyce
Parameters:
eCctCh - The channel to perform the transaction on.
psCctOp - the cctalk transaction to perform
Returns:

History

Here is the call graph for this function:

teCCTALK_ERRORS cctalk_ReceiveOperation teCCTALK_CHANNEL  eCctCh,
tsCCTALK_OPERATION psCctOp
 

Receive completed transactions from a cctalk channel.

A call this is will return a cctalk transaction if one is available to be returned. This job of this function just got a lot more differcult as not only are we interested in the cctalk channel but also a socket handle.

Date:
19/10/04
Author:
Rod Boyce
Parameters:
eCctCh - The cctalk channel to check.
psCctOp - pointer to a cctalk op structure to return the operation in.
Returns:
The error code returned is found in teCCTALK_ERRORS.

History

Here is the call graph for this function:

cctalk_SimpleChecksum unsigned char *  pacData,
unsigned char  bLen
 

return the simple checksum of a packet

Given a pointer to a byte array and a lenght return the simple cctalk packet checksum.

Date:
02/11/04
Author:
Rod Boyce
Parameters:
pacData - pointer to the buffer to perform the checksum over.
bLen - the number of bytes to checksum
Returns:
The calculated checksum

History

cctalk_StrError teCCTALK_ERRORS  eCctError  ) 
 

Get error string based on error code.

Returns an error string describing the error code passed to this function

Date:
26/10/04
Author:
Rod Boyce
Parameters:
eCctError - The error code to process
Returns:
pointer to a string describing the error code

History

cctalk_UseSocket char *  pacSocketName  ) 
 

Called before open to use named socket instead of the default.

Called before opening a channel to set a device name other then the default socket. The socket is opened in client mode so the socket must exist before the client tried to open the socket.

Date:
08/11/04
Author:
Rod Boyce
Parameters:
pacSocketName - pointer to the device to open
Returns:
error code from teCCTALK_ERRORS.

History


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