Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Activity Calender Read - DayProfileAction Is 0

Activity Calender Read - DayProfileAction is 0

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Mohanraj , 16 May, 2020
Forums
General discussion

Hi Mikko,

This is another thread where am unable get proper DayProfileAction scriptLogicalName and scriptSelector after reading the data values are 0s

Below is the code snippet

printf("Reading Activity Calendar...\n");
//const unsigned char ln1[6] = { 0,0,10,0,100,255 }; //script
const unsigned char ln[6] = { 0,0,13,0,0,255 };
gxActivityCalendar activityCalendar;
if ((ret = cosem_init2((gxObject*)&activityCalendar, DLMS_OBJECT_TYPE_ACTIVITY_CALENDAR, ln)) == 0)
{
ret = com_read(connection, &activityCalendar.base, 9);
gxDayProfile* dp;
gxDayProfileAction *dpAct;
gxArray *arr;
int pos, pos2;
for (pos = 0; pos != activityCalendar.dayProfileTablePassive.size; ++pos)
{
arr = &activityCalendar.dayProfileTablePassive;
ret = arr_getByIndex(arr, pos, (void**)&dp);
if (ret != DLMS_ERROR_CODE_OK)
{
return ret;
}
printf("DayId: %d\n", dp->dayId);
for (pos2 = 0; pos2 != dp->daySchedules.size; ++pos2)
{
ret = arr_getByIndex(&dp->daySchedules, pos2, (void**)&dpAct);
if (ret != DLMS_ERROR_CODE_OK)
{
return ret;
}
time_print(NULL,&dpAct->startTime);
char ln[25] ={0};
hlp_getLogicalNameToString(dpAct->scriptLogicalName, ln);
printf("\tLogical name: %s",ln);
printf("\tScritp Selector : %d\n",dpAct->scriptSelector);
}
}

}
Below is the trace and output

TX: 7E A0 07 03 41 93 5A 64 7E
RX: 7E A0 20 41 03 73 3E 9D 81 80 14 05 02 02 00 06 02 02 00 07 04 00 00 00 01 08 04 00 00 00 01 6F EF 7E
TX: 7E A0 41 03 41 10 E4 8F E6 E6 00 60 33 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 07 80 05 4C 57 54 53 4D BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 82 CC 7E
RX: 7E A0 37 41 03 30 21 79 E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 10 14 01 D6 00 07 A7 F9 7E
Return value of = 0
Reading Activity Calendar...
TX: 7E A0 19 03 41 32 3A BD E6 E6 00 C0 01 81 00 14 00 00 0D 00 00 FF 09 00 82 BD 7E
RX: 7E A0 FC 41 03 52 F9 C2 E6 E7 00 C4 01 81 00 01 01 02 02 11 01 01 0C 02 03 09 04 01 00 00 00 09 06 00 00 0A 00 64 FF 12 00 01 02 03 09 04 03 00 00 00 09 06 00 00 0A 00 64 FF 12 00 02 02 03 09 04 06 00 00 00 09 06 00 00 0A 00 64 FF 12 00 03 02 03 09 04 09 00 00 00 09 06 00 00 0A 00 64 FF 12 00 04 02 03 09 04 0C 00 00 00 09 06 00 00 0A 00 64 FF 12 00 05 02 03 09 04 0F 00 00 00 09 06 00 00 0A 00 64 FF 12 00 06 02 03 09 04 12 00 00 00 09 06 00 00 0A 00 64 FF 12 00 07 02 03 09 04 15 00 00 00 09 06 00 00 0A 00 64 FF 12 00 08 02 03 09 04 00 00 00 00 09 06 00 00 0A 00 64 FF 12 00 00 02 03 09 04 00 00 00 00 09 06 00 00 0A 00 64 FF 12 00 00 02 03 09 04 00 00 00 00 09 06 00 00 0A 00 64 FF 12 00 00 02 03 09 04 00 00 00 00 09 06 00 00 0A 00 64 FF 12 00 00 52 F1 7E
Updating the value...
Object Type = 20
DayId: 1
01:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
03:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
06:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
09:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
12:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
15:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
18:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
21:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
00:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
00:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
00:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
00:00:00 Logical name: 00.00.00.00.00.00 Scritp Selector : 0
TX: 7E A0 07 03 41 53 56 A2 7E
RX: 7E A0 20 41 03 73 3E 9D 81 80 14 05 02 02 00 06 02 02 00 07 04 00 00 00 01 08 04 00 00 00 01 6F EF 7E

Enabled only below macro in gxignore.h
#define DLMS_IGNORE_OBJECT_POINTERS

Thanks
Mohan Raj

Profile picture for user Kurumi

Kurumi

6 years 2 months ago

Hi Mohan,

Hi Mohan,

Please, don't create a new thread from the same question. I'll continue answering in the old thread.

http://www.gurux.fi/comment/16734

BR,
Mikko

Mohanraj

6 years 2 months ago

In reply to Hi Mohan, by Kurumi

Hi Mikko,

Hi Mikko,

Thanks. I will continue the discussion in other thread. Thank you so much

Thanks
Mohan Raj

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More

Who's new

  • Thomasqto
  • Uka Ibe
  • CTKNhZElptjSlOrpkXl
  • YCbccqfLGRMnlCWoJhXP
  • Malcolmactig
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin