Permalink
Browse files

Modbus GIP driver 1.2.0, that is able to generate dynamic logging doc…

…ument from product

description files.
  • Loading branch information...
mlouiset committed Oct 6, 2014
1 parent d949bb0 commit 994942c1c6b06f5f73535cd88f50da1e08d8a8af
Showing with 903 additions and 935 deletions.
  1. +1 −1 drivers/modbus/Version
  2. +8 −3 drivers/modbus/apu/package_runtime/apu.sh
  3. +32 −0 drivers/modbus/changelog.txt
  4. +11 −0 drivers/modbus/config/modelconfig.xml
  5. +0 −18 drivers/modbus/diatemplates/dat_cont.xml
  6. +0 −1 drivers/modbus/diatemplates/dat_ipu_cont.xml
  7. +3 −1 drivers/modbus/include/modbus-def.h
  8. +12 −63 drivers/modbus/include/modbus-type.h
  9. +0 −73 drivers/modbus/include/modbus.h
  10. +4 −2 drivers/modbus/lib/Makefile
  11. +392 −86 drivers/modbus/lib/access.c
  12. +47 −39 drivers/modbus/lib/appitf.c
  13. +16 −6 drivers/modbus/lib/diaproducts.c
  14. +1 −1 drivers/modbus/lib/iso8601-ext.c
  15. +15 −24 drivers/modbus/lib/products.c
  16. +1 −1 drivers/modbus/lib/var-helpers.c
  17. +0 −4 drivers/modbus/lib/version.c
  18. +1 −0 drivers/modbus/makefile.def
  19. +10 −10 drivers/modbus/sample/productsDescriptor/Labjack:ue9pro:0.xml
  20. +6 −6 drivers/modbus/sample/productsDescriptor/Telemecanique:OTB1E0DM9LP:0-small.xml
  21. +40 −40 drivers/modbus/sample/productsDescriptor/Telemecanique:OTB1E0DM9LP:0.xml
  22. +20 −2 drivers/modbus/sample/productsDescriptor/productsDescriptor.xsd
  23. +7 −2 drivers/modbus/supervisor/Makefile
  24. +1 −31 drivers/modbus/supervisor/admcli.c
  25. +0 −100 drivers/modbus/supervisor/cproto.h
  26. +14 −169 drivers/modbus/supervisor/main.c
  27. +21 −24 drivers/modbus/supervisor/sensor-cache.c
  28. +1 −2 drivers/modbus/supervisor/sensor-diaclient.c
  29. +120 −88 drivers/modbus/supervisor/sensor-diaserver.c
  30. +1 −1 drivers/modbus/supervisor/sensor-events.c
  31. +12 −81 drivers/modbus/supervisor/sensor-reader.c
  32. +65 −38 drivers/modbus/supervisor/sensor.c
  33. +4 −9 drivers/modbus/supervisor/var.c
  34. +23 −3 drivers/modbus/tests/Makefile
  35. +9 −1 drivers/modbus/xoref/sensor.ref
  36. +5 −5 installer/ong-installer/pom.xml
View
@@ -1 +1 @@
1.0.0
1.2.0
@@ -2,9 +2,14 @@
buildProject()
{
export PATH=$PATH:$(pwd)/bin
cd modbus
make clean
make
cd modbus && \
make clean && \
make && \
if [[ $1 == centos6-x86 ]]
then
cd tests && \
make run
fi
return $?
}
@@ -1,5 +1,37 @@
-------------------------------------------------------------------------------
Modbus GIP driver changelog
-------------------------------------------------------------------------------
Version: 1.2.0
Date: 2014-09-25
New features:
-------------
- Add support for <subattributes> in product description files (see
wago-750-881-acy-custom.xml as example).
Bug Fixes:
----------
- When loosing connection with the device, the driver did not try to
reconnect. Fixed.
- Version string (./modbus.x --version) was not using the same format as all
other GIP drivers. Fixed.
- The driver used to start a separated thread to access the ModBus devices
(read and write). But access the program data were not safely protected.
Fixed: now the program does not start any other thread, and only run in a
single-thread process.
Dependencies:
-------------
- cproto-4.6-0
- drvcommon-1.4.14-0
- libcoap-1.8.8-0
- libdIa-1.0.25-0
- libmodbus-3.0.5-0
- libxml2-2.7.8-0
- m2mxoref-1.1.12-1
- rtbase-1.2.3-0
- libxo-4.2.10-0
-------------------------------------------------------------------------------
Version: 1.0.0
Date: 2014-06-17
@@ -34,4 +34,15 @@
</covConfigurations>
</interface>
<interface filter="modbus:/int/AcyCustom.Srv">
<descriptor>
<!-- logging -->
<point name="m2mCustomPowerMeasure" config="logging"/>
</descriptor>
<covConfigurations>
<covConfiguration filter="modbus:/attribute/m2mCustomPowerMeasure" minInterval="PT5S" maxInterval="PT2H"/>
</covConfigurations>
</interface>
</resourceModeling>
@@ -1,27 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<m2m:container m2m:id="${c_num}"
xmlns:m2m="http://uri.etsi.org/m2m">
<!--
<m2m:accessRightID>${s_rootacc}/APP_${d_ieee}.${a_num}_AR</m2m:accessRightID>
-->
<m2m:accessRightID>${s_rootacc}/Locadmin_AR1</m2m:accessRightID>
<m2m:searchStrings>
<m2m:searchString>ETSI.ObjectSemantic/OASIS.OBIX_1_1</m2m:searchString>
</m2m:searchStrings>
<!--
<m2m:maxNrOfInstances>10</m2m:maxNrOfInstances>
<m2m:maxInstanceAge>11</m2m:maxInstanceAge>
-->
<!-- added if necessary
xmlns:acy=http://uri.actility.com/m2m
-->
<!--
<acy:storageConfiguration>
<acy:param name="store:driver" val="ram"/>
</acy:storageConfiguration>
-->
</m2m:container>
@@ -5,5 +5,4 @@
<m2m:searchString>ETSI.ObjectSemantic/OASIS.OBIX_1_1</m2m:searchString>
</m2m:searchStrings>
<m2m:maxNrOfInstances>100</m2m:maxNrOfInstances>
<m2m:maxInstanceAge>2592000</m2m:maxInstanceAge>
</m2m:container>
@@ -11,7 +11,7 @@
#define MAX_SSR_PER_RTR 10240
#define CHECK_IS_OBIX(dst) \
if (!dst) return; if (XoIsObix(dst) <= 0) {RTL_TRDBG(0,"ERROR not an obix object\n");return;}
if (!dst) return 1; if (XoIsObix(dst) <= 0) {RTL_TRDBG(0,"ERROR not an obix object\n");return 1;}
#define DIA_KO() (DiaIpuOk == 0 || DiaNetOk == 0)
@@ -33,6 +33,8 @@
// Max of t_cov struct
#define CZ_MAX 100
#define VAL_IN_ERROR "##"
/*
* Easy Var init for t_var struct
* must be move in drvcommon
@@ -12,14 +12,11 @@
#include "modbus/modbus-rtu.h"
#include "modbus/modbus-tcp.h"
typedef struct _sensor_t t_sensor;
typedef struct _sensor_t Sensor_t;
typedef struct _network_t Network_t;
typedef struct _product_t Product_t;
typedef struct _Point_t Point_t;
typedef struct _Attr_t Attr_t;
typedef struct _Value_t Value_t;
/*
* From Sensor header
@@ -36,6 +33,7 @@ typedef struct _Value_t Value_t;
#define cp_dia_repok cp_cmn.cmn_dia_repok
#define cp_dia_reperr cp_cmn.cmn_dia_reperr
#define MAX_NAME 256
#define CP_NUM_NETWORK 1
#define CP_NUM_DEVICE 2
@@ -112,22 +110,16 @@ struct _network_t {
#define ACCESS_BOOL 1
#define ACCESS_UINT8 2
#define ACCESS_INT8 3
#define ACCESS_UINT16_LE 4
#define ACCESS_UINT16_BE 5
#define ACCESS_INT16_LE 6
#define ACCESS_INT16_BE 7
#define ACCESS_INT 8
#define ACCESS_UINT 9
#define ACCESS_UINT32_LE 10
#define ACCESS_UINT32_BE 11
#define ACCESS_INT32_LE 12
#define ACCESS_INT32_BE 13
#define ACCESS_FLOAT 14
#define ACCESS_FLOAT_LE 15
#define ACCESS_FLOAT_BE 16
#define ACCESS_DOUBLE 17
#define ACCESS_DOUBLE_LE 18
#define ACCESS_DOUBLE_BE 19
#define ACCESS_UINT16 4
#define ACCESS_INT16 5
#define ACCESS_UINT32 6
#define ACCESS_INT32 7
#define ACCESS_FLOAT 8
#define ACCESS_DOUBLE 9
#define ACCESS_DATE_TIME 10
#define ACCESS_ARRAY 11
#define MAX_MODBUS_ACCESS_SIZE 1024
/*
Discretes Input
@@ -156,48 +148,5 @@ This type of data
#define MAP_INPUT 3
#define MAP_HOLDING 4
/*
* Describe Attr in retargeting config
*/
struct _Attr_t {
struct list_head list;
char *modbusType;
int modbusTypeID;
char *modbusAccess;
bool isReadable;
bool isWritable;
// Decoded version of modbusAccess
uint16_t mask;
int reg, map;
};
struct _Value_t {
union {
bool boolValue;
} u;
};
/*
* Describe Point in logging config
*/
struct _Point_t {
struct list_head list;
bool isInit;
bool toDelete;
time_t nextMaxInterval;
time_t nextRead;
int minInterval;
int maxInterval;
char *containerID;
Value_t lastVal;
uint16_t rq_cluster, rq_attribut, rq_member;
void *xo;
Attr_t attr;
};
#endif /* __MODBUS_TYPE__ */
@@ -1,73 +0,0 @@
#ifndef __MODBUS__
#define __MODBUS__
/*
* Overwrite drvcommon define
*/
#define CMN_IEEE_SIZE 128
#include <time.h>
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <poll.h>
#include <unistd.h>
#include <errno.h>
#include "rtlbase.h"
#include "rtllist.h"
#include "rtlimsg.h"
#include "cmnstruct.h"
#include "cmndefine.h"
#include "modbus-def.h"
#include "modbus-type.h"
#define XO_APRES_2_1
#include "xo.h"
#include "xo-helpers.h"
#include "dIa.h"
#include "cproto.h"
#include "cmnproto.h"
#include "speccproto.h"
#include "specextern.h"
#include "libmodbus-acy.h"
#include "cproto.h"
/*
* Global from drvcommon / supervisor
*/
extern const char *modbus_whatStr;
extern t_cli *TbCli[];
extern int Operating;
extern char *rootactPath;
extern int TraceDebug;
extern int TraceLevel;
extern int TraceProto;
extern int PseudoOng;
extern int WithDia;
extern int DiaTraceRequest;
extern void *MainIQ;
extern void *MainTbPoll;
extern void *MdlCfg;
extern dia_context_t *DiaCtxt;
extern int DiaNbReqPending;
extern int DiaMaxReqPending;
extern int DiaConsecutiveTimeout;
extern unsigned int DiaSendCount;
extern unsigned int DiaRecvCount;
extern unsigned int DiaRtryCount;
extern unsigned int DiaTimeCount;
extern unsigned int DiaIpuOk;
extern unsigned int DiaNetOk;
extern unsigned int DiaIpuTmt;
extern unsigned int DiaNetTmt;
extern unsigned int DiaIpuErr;
extern unsigned int DiaNetErr;
extern unsigned int DiaRepDrp;
extern struct list_head NetworkInternalList;
#endif /* __MODBUS__ */
@@ -2,9 +2,11 @@ include $(ROOTACT)/modbus/makefile.def
LIB=libmodbus-acy
SRC=\
value_t.c \
attr_t.c \
point_t.c \
var-helpers.c \
iso8601-ext.c \
version.c \
diaproducts.c \
products.c \
appitf.c \
@@ -21,9 +23,9 @@ $(LIB).a: $(OBJ) $(LIB).h
$(LIB).h: $(SRC)
cproto -c $(INC) $(DEFINC) -o $@ $^
version.o: ../Version
%.o: %.c $(LIB).h
$(CC) $(CCFLAGS) $(INC) -c $<
clean:
@(rm *.x *.o *.a core 2>/dev/null || exit 0)
Oops, something went wrong.

0 comments on commit 994942c

Please sign in to comment.