#include <stdio.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include "cctalk-channel-defs.h"
#include "cctalk-operations.h"
#include "cctalk-channel.h"
#include "cctalk-pkts.h"
#include "cctalk-pkt-utls.h"
#include "cctalk-socket.h"
Include dependency graph for cctalk-client.c:

Functions | |
| void | cctalk_ch_Initialise (void) |
| cctalk_ch_Initialise | |
| teCCTALK_ERRORS | cctc_SendCommandPacket (tsCCT_PKT_CHANNEL_CMD *sCctCmdPkt) |
| Send a command packet to the cctalk server. | |
| teCCTALK_ERRORS | cctc_SendOperationPacket (tsCCTALK_OPERATION_PKT *psCctOpPkt) |
| Send a cctalk operation packet to the server to be processed. | |
| teCCTALK_ERRORS | cctc_SentRxOpPkt (tsCCT_PKT_CHANNEL_CMD *psCctCmdPkt, tsCCTALK_OPERATION *psCctOp) |
| Will request the server to send us any completed cctalk operation we sent to it. | |
| teCCTALK_ERRORS | cctc_ReceiveErrorPacket (void) |
| Get an error packet from the server. | |
| 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_CloseChannel (teCCTALK_CHANNEL eCctCh) |
| Called to close a cctalk channel. | |
| 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_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. | |
| char * | cctalk_StrError (teCCTALK_ERRORS eCctError) |
| Get error string based on error code. | |
Variables | |
| int | qIsInitialised = 0 |
| char * | pacCctErrorCodes [] |
| char | acCctalkSocket [100] = "/dev/cctalk" |
| int | fdSock |
| unsigned char | qIsChannelSocketInUse [eCCTALK_CHANNEL_END] |
| sockaddr_un | sAddress |
| size_t | zlAddrLength |
|
|
cctalk_ch_Initialise Initialise the client communication socket to closed.
History |
|
|
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.
History |
Here is the call graph for this function:

|
|
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.
History |
Here is the call graph for this function:

|
|
Send a command to the server to tell it to Exit nicely.
History |
Here is the call graph for this function:

|
|
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.
History |
Here is the call graph for this function:

|
||||||||||||
|
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.
History |
Here is the call graph for this function:

|
||||||||||||
|
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.
History |
Here is the call graph for this function:

|
||||||||||||
|
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.
History |
Here is the call graph for this function:

|
|
Get error string based on error code. Returns an error string describing the error code passed to this function
History |
|
|
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.
History |
|
|
Get an error packet from the server. After a command packet and a operation queue packet has been sent to the server we wait for an error packet to be sent back to indicate that the command completed successfully.
History |
Here is the call graph for this function:

|
|
Send a command packet to the cctalk server. Send a command packet to the cctalk server and wait for the reply. Command packets are blocking they wait for a reply. Command packets are used to open a cctalk channel, close a cctalk channel or query status of the server.
History |
Here is the call graph for this function:

|
|
Send a cctalk operation packet to the server to be processed. Send a cctalk operation packet to the server to be queued
History |
Here is the call graph for this function:

|
||||||||||||
|
Will request the server to send us any completed cctalk operation we sent to it. This function will send a message to the server to ask it to look for cctalk operations that were sent to it on this socket for the requested channel.
History |
Here is the call graph for this function:

|
|
Initial value:
{
"eCCTALK_SUCCESS", "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"
}
|
1.3.6