Hi,
I'm trying to create a Profile generic object but I'm not able to read the buffer with the DLMSDirector.
The DLMS server is running in a MCU with DLMS in C. I'm able to read the data registers and clock that belongs to the Profile generic, but not the profile generic buffer.
From the DLMSDirector I can see the access rigths for the buffer it is No Access. How can I change this property? I haven't seen any property value or something to change it.
The code for the object is the following one:
int ret;
//7 capture objects.
static gxTarget CAPTURE_OBJECT[7] = { 0 };
const unsigned char ln[6] = { 1, 0, 99, 1, 0, 255 };
if ((ret = INIT_OBJECT(profileGeneric, DLMS_OBJECT_TYPE_PROFILE_GENERIC, ln)) == 0)
{
profileGeneric.capturePeriod = 60;
//Maximum row count. One row takes 6 bytes. Allocate 150 rows = 900B.
profileGeneric.profileEntries = 20;
profileGeneric.sortMethod = DLMS_SORT_METHOD_FIFO;
//entries in use.
profileGeneric.entriesInUse = 0;
///////////////////////////////////////////////////////////////////
//Add 7 columns.
ARR_ATTACH(profileGeneric.captureObjects, CAPTURE_OBJECT, 7);
//Add clock object.
CAPTURE_OBJECT[0].target = BASE(clock1);
CAPTURE_OBJECT[0].attributeIndex = 2;
CAPTURE_OBJECT[0].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[1].target = BASE(instantVR);
CAPTURE_OBJECT[1].attributeIndex = 2;
CAPTURE_OBJECT[1].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[2].target = BASE(instantVT);
CAPTURE_OBJECT[2].attributeIndex = 2;
CAPTURE_OBJECT[2].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[3].target = BASE(instantVS);
CAPTURE_OBJECT[3].attributeIndex = 2;
CAPTURE_OBJECT[3].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[4].target = BASE(instantIR);
CAPTURE_OBJECT[4].attributeIndex = 2;
CAPTURE_OBJECT[4].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[5].target = BASE(instantIT);
CAPTURE_OBJECT[5].attributeIndex = 2;
CAPTURE_OBJECT[5].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[6].target = BASE(instantIS);
CAPTURE_OBJECT[6].attributeIndex = 2;
CAPTURE_OBJECT[6].dataIndex = 0;
//Set clock to sort object.
profileGeneric.sortObject = BASE(clock1);
profileGeneric.sortObjectAttributeIndex = 2;
}
return 0;
Hi, You can change the …
Hi,
You can change the access right in the svr_getAttributeAccess method.
https://github.com/Gurux/GuruxDLMS.c/blob/136207781359516d959ee0c3ebf26…
BR,
Mikko
Hi, The problem it is…
Hi,
The problem it is solved, it wasn't the access, because I have fixed it to read mode in the code. It was a problem with the clock, if the clock source it's bad defined, it doesn't return any error and the buffer state changes from read to no access.
As I do not have a clock source in this simulation, I wasn't able to read it. As soon as, I solved the clock parameters, I was able to read it.
Thanks,
Pablo