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

plcmodem.h File Reference


Detailed Description

PLC modem driver header.

#include <st7538.h>

Include dependency graph for plcmodem.h:

Include dependency graph

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

Included by dependency graph

Typedefs

typedef int plcError
 Error code.

typedef void * plcHandle
 Handle for a PLC device.

typedef unsigned long plcMSR
 plcmodem MSR


Enumerations

enum  PLC_MSR_BITS {
  PLC_MSR_CLRT = 0x000008L,
  PLC_MSR_RXD = 0x000010L,
  PLC_MSR_RESET_ = 0x404040L,
  PLC_MSR_MCLK = 0x000080L,
  PLC_MSR_TOUT = 0x000800L,
  PLC_MSR_REGOK_ = 0x001000L,
  PLC_MSR_PG = 0x008000L,
  PLC_MSR_ZCOUT = 0x080000L,
  PLC_MSR_BU = 0x100000L,
  PLC_MSR_CD_PD = 0x800000L
}
 Plcmodem Modem Status Register bits. More...


Functions

plcError plcInitialize (const char *device, plcHandle *handle)
 Initializes a PLC modem device.

plcError plcReadRegister (plcHandle handle, st7538reg *reg)
 Reads PLC modem register.

plcError plcWriteRegister (plcHandle handle, st7538reg reg)
 Writes PLC modem register.

plcError plcWrite (plcHandle handle, const char *data, int n)
 Sends data through PLC modem.

plcError plcRead (plcHandle handle, char *data, int size, int *n)
 Receives data from PLC modem.

plcError plcReadMSR (plcHandle handle, plcMSR *msr)
 Reads the Modem Status Register of PLC device.

plcError plcFinalize (plcHandle handle)
 Finalizes a PLC modem device.

plcError plcSendBreak (plcHandle handle, int duration)
 Puts the communitaion line in break state.


Enumeration Type Documentation

enum PLC_MSR_BITS
 

Plcmodem Modem Status Register bits.

Enumeration values:
PLC_MSR_CLRT  CLRT.
PLC_MSR_RXD  RXD.
PLC_MSR_RESET_  RESET#.
PLC_MSR_MCLK  MCLK.
PLC_MSR_TOUT  TOUT.
PLC_MSR_REGOK_  REG_OK#.
PLC_MSR_PG  PG.
PLC_MSR_ZCOUT  ZCOUT.
PLC_MSR_BU  BU.
PLC_MSR_CD_PD  CD/PD.


Function Documentation

plcError plcFinalize plcHandle  handle  ) 
 

Finalizes a PLC modem device.

Parameters:
handle handle to device to close
Returns:
error code

plcError plcInitialize const char *  device,
plcHandle handle
 

Initializes a PLC modem device.

Parameters:
device name of device to initialize
handle filled with handle to opened device
Returns:
error code

plcError plcRead plcHandle  handle,
char *  data,
int  size,
int *  n
 

Receives data from PLC modem.

Parameters:
handle handle to opened PLC device
data pointer to receive buffer
size size of receive buffer
n number of bytes received
Returns:
error code

plcError plcReadMSR plcHandle  handle,
plcMSR msr
 

Reads the Modem Status Register of PLC device.

Parameters:
handle handle to PLC device
msr pointer MSR data
Returns:
error code

plcError plcReadRegister plcHandle  handle,
st7538reg reg
 

Reads PLC modem register.

Parameters:
handle handle to opened PLC device
reg filled with data read from ST7538 register
Returns:
error code

plcError plcSendBreak plcHandle  handle,
int  duration
 

Puts the communitaion line in break state.

Parameters:
handle handle to PLC device
duration duration of the break state in milliseconds
Returns:
error code

plcError plcWrite plcHandle  handle,
const char *  data,
int  n
 

Sends data through PLC modem.

Parameters:
handle handle to opened PLC device
data pointer to data to send
n number of bytes of data to send
Returns:
error code

plcError plcWriteRegister plcHandle  handle,
st7538reg  reg
 

Writes PLC modem register.

Parameters:
handle handle to opened PLC device
reg data to be written to ST7538 register
Returns:
error code


Generated on Sun Aug 21 21:28:46 2005 for PLC Modem/ABNT-14522 Library by doxygen 1.3.7