.TH "MbusMasterFunctions" 3 "26 May 2004" "Modbus Protocol Library Documentation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
MbusMasterFunctions \- 
.SH SYNOPSIS
.br
.PP
Inherited by \fBMbusSerialMasterProtocol\fP, and \fBMbusTcpMasterProtocol\fP.
.PP
.SH "Detailed Description"
.PP 
Base class which implements Modbus data and control functions. 

The functions provided by this base class apply to all protocol flavours via inheritance. For a more detailed description see section \fBData and Control Functions for all Protocol Flavours\fP.
.PP
\fBVersion:\fP
.RS 4
1.1 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBmbusmaster\fP 
.PP
\fBMbusSerialMasterProtocol\fP, \fBMbusRtuMasterProtocol\fP 
.PP
\fBMbusAsciiMasterProtocol\fP, \fBMbusTcpMasterProtocol\fP 
.RE
.PP

.PP
.SS "Class 0 Modbus Functions"

.in +1c
.ti -1c
.RI "int \fBwriteMultipleRegisters\fP (int slaveAddr, int startRef, const short regArr[], int refCnt)"
.br
.RI "\fIModbus function 16 (10 hex), Preset Multiple Registers/Write Multiple Registers. \fP"
.ti -1c
.RI "int \fBwriteMultipleLongInts\fP (int slaveAddr, int startRef, const long int32Arr[], int refCnt)"
.br
.RI "\fIModbus function 16 (10 hex) for 32-bit long int data types, Preset Multiple Registers/Write Multiple Registers with long int data. \fP"
.ti -1c
.RI "int \fBwriteMultipleMod10000\fP (int slaveAddr, int startRef, const long int32Arr[], int refCnt)"
.br
.RI "\fIModbus function 16 (10 hex) for 32-bit modulo-10000 long int data types, Preset Multiple Registers/Write Multiple Registers with modulo-10000 long int data. \fP"
.ti -1c
.RI "int \fBwriteMultipleFloats\fP (int slaveAddr, int startRef, const float float32Arr[], int refCnt)"
.br
.RI "\fIModbus function 16 (10 hex) for 32-bit float data types, Preset Multiple Registers/Write Multiple Registers with float data. \fP"
.ti -1c
.RI "int \fBreadMultipleRegisters\fP (int slaveAddr, int startRef, short regArr[], int refCnt)"
.br
.RI "\fIModbus function 3 (03 hex), Read Holding Registers/Read Multiple Registers. \fP"
.ti -1c
.RI "int \fBreadMultipleLongInts\fP (int slaveAddr, int startRef, long int32Arr[], int refCnt)"
.br
.RI "\fIModbus function 3 (03 hex) for 32-bit long int data types, Read Holding Registers/Read Multiple Registers as long int data. \fP"
.ti -1c
.RI "int \fBreadMultipleMod10000\fP (int slaveAddr, int startRef, long int32Arr[], int refCnt)"
.br
.RI "\fIModbus function 3 (03 hex) for 32-bit modulo-10000 long int data types, Read Holding Registers/Read Multiple Registers as modulo-10000 long int data. \fP"
.ti -1c
.RI "int \fBreadMultipleFloats\fP (int slaveAddr, int startRef, float float32Arr[], int refCnt)"
.br
.RI "\fIModbus function 3 (03 hex) for 32-bit float data types, Read Holding Registers/Read Multiple Registers as float data. \fP"
.in -1c
.SS "Class 1 Modbus Functions"

.in +1c
.ti -1c
.RI "int \fBreadCoils\fP (int slaveAddr, int startRef, int bitArr[], int refCnt)"
.br
.RI "\fIModbus function 1 (01 hex), Read Coil Status/Read Coils. \fP"
.ti -1c
.RI "int \fBreadInputDiscretes\fP (int slaveAddr, int startRef, int bitArr[], int refCnt)"
.br
.RI "\fIModbus function 2 (02 hex), Read Inputs Status/Read Input Discretes. \fP"
.ti -1c
.RI "int \fBreadInputRegisters\fP (int slaveAddr, int startRef, short regArr[], int refCnt)"
.br
.RI "\fIModbus function 4 (04 hex), Read Input Registers. \fP"
.ti -1c
.RI "int \fBreadInputLongInts\fP (int slaveAddr, int startRef, long int32Arr[], int refCnt)"
.br
.RI "\fIModbus function 4 (04 hex) for 32-bit long int data types, Read Input Registers as long int data. \fP"
.ti -1c
.RI "int \fBreadInputMod10000\fP (int slaveAddr, int startRef, long int32Arr[], int refCnt)"
.br
.RI "\fIModbus function 4 (04 hex) for 32-bit modulo-10000 long int data types, Read Input Registers as modulo-10000 long int data. \fP"
.ti -1c
.RI "int \fBreadInputFloats\fP (int slaveAddr, int startRef, float float32Arr[], int refCnt)"
.br
.RI "\fIModbus function 4 (04 hex) for 32-bit float data types, Read Input Registers as float data. \fP"
.ti -1c
.RI "int \fBwriteCoil\fP (int slaveAddr, int bitAddr, int bitVal)"
.br
.RI "\fIModbus function 5 (05 hex), Force Single Coil/Write Coil. \fP"
.ti -1c
.RI "int \fBwriteSingleRegister\fP (int slaveAddr, int regAddr, short regVal)"
.br
.RI "\fIModbus function 6 (06 hex), Preset Single Register/Write Single Register. \fP"
.ti -1c
.RI "int \fBreadExceptionStatus\fP (int slaveAddr, unsigned char *statusByte)"
.br
.RI "\fIModbus function 7 (07 hex), Read Exception Status. \fP"
.in -1c
.SS "Class 2 Modbus Functions"

.in +1c
.ti -1c
.RI "int \fBforceMultipleCoils\fP (int slaveAddr, int startRef, const int bitArr[], int refCnt)"
.br
.RI "\fIModbus function 15 (0F hex), Force Multiple Coils. \fP"
.ti -1c
.RI "int \fBmaskWriteRegister\fP (int slaveAddr, int regAddr, unsigned short andMask, unsigned short orMask)"
.br
.RI "\fIModbus function 22 (16 hex), Mask Write Register. \fP"
.ti -1c
.RI "int \fBreadWriteRegisters\fP (int slaveAddr, int readRef, short readArr[], int readCnt, int writeRef, const short writeArr[], int writeCnt)"
.br
.RI "\fIModbus function 23 (17 hex), Read/Write Registers. \fP"
.in -1c
.SS "Protocol Configuration"

.in +1c
.ti -1c
.RI "int \fBsetTimeout\fP (int timeOut)"
.br
.RI "\fIConfigures time-out. \fP"
.ti -1c
.RI "int \fBgetTimeout\fP ()"
.br
.RI "\fIReturns the time-out value. \fP"
.ti -1c
.RI "int \fBsetPollDelay\fP (int pollDelay)"
.br
.RI "\fIConfigures poll delay. \fP"
.ti -1c
.RI "int \fBgetPollDelay\fP ()"
.br
.RI "\fIReturns the poll delay time. \fP"
.ti -1c
.RI "int \fBsetRetryCnt\fP (int retryCnt)"
.br
.RI "\fIConfigures the automatic retry setting. \fP"
.ti -1c
.RI "int \fBgetRetryCnt\fP ()"
.br
.RI "\fIReturns the automatic retry count. \fP"
.in -1c
.SS "Transmission Statistic Functions"

.in +1c
.ti -1c
.RI "unsigned long \fBgetTotalCounter\fP ()"
.br
.RI "\fIReturns how often a message transfer has been executed. \fP"
.ti -1c
.RI "void \fBresetTotalCounter\fP ()"
.br
.RI "\fIResets total message transfer counter. \fP"
.ti -1c
.RI "unsigned long \fBgetSuccessCounter\fP ()"
.br
.RI "\fIReturns how often a message transfer was successful. \fP"
.ti -1c
.RI "void \fBresetSuccessCounter\fP ()"
.br
.RI "\fIResets successful message transfer counter. \fP"
.in -1c
.SS "Word Order Configuration"

.in +1c
.ti -1c
.RI "void \fBconfigureBigEndianInts\fP ()"
.br
.RI "\fIConfigures int data type functions to do a word swap. \fP"
.ti -1c
.RI "void \fBconfigureSwappedFloats\fP ()"
.br
.RI "\fIConfigures float data type functions to do a word swap. \fP"
.ti -1c
.RI "void \fBconfigureLittleEndianInts\fP ()"
.br
.RI "\fIConfigures int data type functions not to do a word swap. \fP"
.ti -1c
.RI "void \fBconfigureIeeeFloats\fP ()"
.br
.RI "\fIConfigures float data type functions not to do a word swap. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "virtual \fB~MbusMasterFunctions\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "virtual int \fBisOpen\fP ()"
.br
.RI "\fIReturns whether the protocol is open or not. \fP"
.ti -1c
.RI "virtual void \fBcloseProtocol\fP ()"
.br
.RI "\fICloses an open protocol including any associated communication resources (com ports or sockets). \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "char * \fBgetPackageVersion\fP ()"
.br
.RI "\fIReturns the package version number. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBMbusMasterFunctions\fP ()"
.br
.RI "\fIConstructs a MbusMasterFunctions object and initialises its data. \fP"
.in -1c
.SH "Constructor & Destructor Documentation"
.PP 
.SS "\fBMbusMasterFunctions\fP ()\fC [protected]\fP"
.PP
Constructs a MbusMasterFunctions object and initialises its data. It also detects the endianess of the machine it's running on and configures byte swapping if necessary. 
.SS "~\fBMbusMasterFunctions\fP ()\fC [virtual]\fP"
.PP
Destructor. Does clean-up and closes an open protocol including any associated communication resources (serial ports or sockets). 
.SH "Member Function Documentation"
.PP 
.SS "int isOpen ()\fC [virtual]\fP"
.PP
Returns whether the protocol is open or not. \fBReturn values:\fP
.RS 4
\fItrue\fP = open 
.br
\fIfalse\fP = closed 
.RE
.PP
Reimplemented in \fBMbusTcpMasterProtocol\fP, and \fBMbusSerialMasterProtocol\fP.

.SH "Author"
.PP 
Generated automatically by Doxygen for Modbus Protocol Library Documentation from the source code.
