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. Node
  3. Duplicate Call of SaveSettings

duplicate call of saveSettings

Profile picture for user batulzii
By batulzii , 10 January, 2024
Forums
Gurux.DLMS

server implementation for Nordic.
void captureEventLog(uint16_t value)
{
int ret;
gxEventLogData row;
// Profile generic Capture is called. Save data to the buffer.
// Ring buffer is used here.
row.time = time_current();
row.event = value;
ret = SERIALIZER_SAVE(SETTINGS_BUFFER_SIZE + LOAD_PROFILE_BUFFER_SIZE + eventLogRowIndex * sizeof(gxEventLogData), sizeof(gxEventLogData), &row);
// Update how many entries is used until buffer is full.
if (eventLog.entriesInUse != eventLog.profileEntries)
{
++eventLog.entriesInUse;
}
// Update row index where next row is added.
++eventLogRowIndex;
eventLogRowIndex = eventLogRowIndex % eventLog.profileEntries;
saveSettings(BASE(eventLog), GET_ATTRIBUTE(7));
}

void updateState(uint16_t value)
{
GX_UINT16(eventCode.value) = value;
captureEventLog(value);
// Update Entries in use for event log.
saveSettings(BASE(eventLog), GET_ATTRIBUTE(7));
}

called saveSettings when updateState called, and again saveSettings called in captureEventLog. is it not double called?

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 11/19/2026 - 10:57
    Gurux.DLMS.Python 1.0.204
  • Thu, 11/19/2026 - 10:12
    gurux.dlms.c 9.0.2611.1901
  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101

New forum topics

  • Dobilliard | WA 083148835648
  • AvengingXen Pool at Zeus Billiard & Cafe Alam Sutera | WA 083148835648
  • JIMMY JUSMAN | WA 083148835648
  • MAXX CUES (SERVIC STICK BILLIARD) | WA 083148835648
  • Equator Billiard | WA 083148835648
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin