versadac  1
versadac - Scalable Recorder Firmware
mc_dataReadUnsignedInt.h
1 /*******************************************************************************
2 FILE : mc_dataReadUnsignedInt.h
3 VERSION : $Id: mc_dataReadUnsignedInt.h 4938 2006-10-10 14:20:18Z martinto $
4 SYSTEM : __GNUC__ on vxworks
5 DESCRIPTION : Master comms dataRead class
6 *******************************************************************************/
7 
8 #ifndef __MC_DATAREADUNSIGNEDINT_H
9 #define __MC_DATAREADUNSIGNEDINT_H
10 #include "mc_dataRead.h"
11 #include "ENUM_MCDataTypes.h"
12 #include "ENUM_MCUpdateIntervals.h"
13 
15 {
16  protected:
18  ENUM_MCFunctionCodes z_function,
19  uint16 z_baseRegister,
20  ENUM_MCDataTypes z_dataType
21  );
22  public:
23 
24  virtual ~mc_dataReadUnsignedInt();
25 
26  static mc_dataReadUnsignedInt* newTransaction(
27  uint8 z_deviceNo,
28  ENUM_MCUpdateIntervals z_frequency,
29  ENUM_MCFunctionCodes z_function,
30  uint16 z_baseRegister,
31  ENUM_MCDataTypes z_dataType
32  );
33 
34  // The service below is to be used for acyclic reads only and
35  // is for use on unregistered devices.
36  static mc_dataReadUnsignedInt* newTransaction (
37  char * z_ipAddressOrName,
38  uint8 z_modbusAddress,
39  ENUM_MCFunctionCodes z_function,
40  uint16 z_baseRegister,
41  ENUM_MCDataTypes z_dataType,
42  uint32 z_timeout,
43  uint16 z_network);
44 
45  uint32 readValue();
46 
47  virtual void printTo(FILE*);
48 
49  private:
50  static uint16 readNumberOfRegs(ENUM_MCDataTypes z_dataType);
51 
52  ENUM_MCDataTypes m_dataType;
53 
54 };
55 
56 #endif
Definition: mc_dataRead.h:13
Definition: mc_dataReadUnsignedInt.h:14