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

Leitor Class Reference

#include <leitor.h>

Collaboration diagram for Leitor:

Collaboration graph
[legend]

Detailed Description

Reader device class.

Contains all functions, parameters and data related to the reader device and its communication, such as the FSM and the function used to build the command block.


Public Member Functions

 Leitor (Communication *com)
 Sets the communication device and the initial communication state in the FSM.

void Fsm (void)
 Contains the states of the communication.

int montarComando (unsigned char *buffer, unsigned char comando)
 Mounts the command to be transmitted.

void doCommunication (int comando)
 Called when the communication is established.

void setCommand (unsigned char comando)
 Sets the command number code to be sent to the meter device.

unsigned char getCommand (void)
 Gets the command number code to be sent to the meter device.

int getSerialNumber (void)
 Gets the serial number of the reader device being used.

void setSerialNumber (int serialNum)
 Sets the serial number of the reader device being used.


Member Function Documentation

void Leitor::doCommunication int  comando  ) 
 

Called when the communication is established.

Parameters:
comando the command to be sent.

unsigned char Leitor::getCommand void   ) 
 

Gets the command number code to be sent to the meter device.

Returns:
the command number code

int Leitor::getSerialNumber void   ) 
 

Gets the serial number of the reader device being used.

Returns:
the serial number of the reader device

int Leitor::montarComando unsigned char *  buffer,
unsigned char  comando
 

Mounts the command to be transmitted.

Parameters:
buffer bytes that will be sent.
comando the command to be sent.

void Leitor::setCommand unsigned char  comando  ) 
 

Sets the command number code to be sent to the meter device.

Parameters:
comando the command number code

void Leitor::setSerialNumber int  serialNum  ) 
 

Sets the serial number of the reader device being used.

Parameters:
serialNum is the serial number of the meter device


The documentation for this class was generated from the following file:
Generated on Sun Aug 21 21:28:48 2005 for PLC Modem/ABNT-14522 Library by doxygen 1.3.7