Product Documentation

FairCom ODK Driver

Previous Topic

Next Topic

FairCom ODK Driver

The FairCom ODK driver follows the standard states for function blocks defined by Siemens:

  • Done
  • Busy
  • Status code

NULL and Default Values:

  • NULL occurs when all bytes in a value are set to zero.
  • When feasible, FairCom provides default values for function parameters when the parameter value is set to NULL.

The FairCom ODK driver provides the PLC function blocks listed in this chapter.

Classes

FCODKDriver

This is the FairCom ODK driver class with the function blocks (to be called from PLC programs) implementation on top of c-tree's c-treeDB API.

Constructors & Destructor

FCODKDriver(int channelNbr);

virtual ~FCODKDriver();

Public Static Methods

static void CreateList(ppFCODKDriver driverList, int driverCount);

static void DestroyList(ppFCODKDriver driverList, int driverCount);

Public Methods

void Connect();

void CheckConnection();

void Disconnect();

void CheckDisconnection();

void TableCreate(const char *tableName, unsigned char pkLen, unsigned char retentionUnit, const char *retentionMeasure);

void TableUpdate(const char *tableName, const char *newTableName, unsigned char retentionUnit, const char *retentionMeasure);

void TableDelete(const char *tableName);

void RecordRead(const char *tableName, const char *pk, unsigned long *valueLen, void *valueBuffer);

void RecordInsert(const char *tableName, const char *pk, unsigned long valueLen, void *valueBuffer);

void RecordUpdate(const char *tableName, const char *pk, unsigned long valueLen, void *valueBuffer);

void RecordPKUpdate(const char *tableName, const char *pk, const char *newPK);

void RecordDelete(const char *tableName, const char *pk);

void RecordCount(const char *tableName, unsigned long long *recordCount);

void ResetIOChannel();

int GetChannelNbr() { return _channelNbr; };

pFCODKParam GetFuncParam() { return _funcParam; };

pFCODKParam GetInputParam() { return _inputParam; };

int GetRequestQueueHandle() { return _requestQueueHandle; };

int GetResponseQueueHandle() { return _responseQueueHandle; };

In This Chapter

TableCreate

TableDelete

RecordRead

RecordInsert

RecordUpdate

RecordPKUpdate

RecordDelete

RecordCount

ResetIOChannel

TOCIndex