Skip to main content
Home
for DLMS smart meters

Main navigation

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

Breadcrumb

  1. Home
  2. Auto Connect
gxdn
Profile picture for user Administrator
By Administrator, 23 January, 2018
Auto connect object is used to define how the meter will make a connection to the server.

This feature can be used with dynamic IP addresses when the meter IP address is unknown. The meter will establish the connection with a given interval to the reader service so the reader can read the meter when needed.

Properties

  • 1. Logical Name
    Logical name of the object.
  • 2. Mode
    Defines how device is making connection to the server.
  • 3. Repetitions
    How many times is try to connect to the server.
  • 4. Repetition delay
    How many seconds is waited before reconnect.
  • 5. Calling window
    Time window when device try to make connection to the server.
  • 6. Destination list
    Contains list of phone numbers, TCP/IP address, etc where connection is made.

Actions

There are no actions available for this object type.

  • Initialize
  • CallingWindow
  • Destinations
gxByteBuffer *str;
gxtime *start, *end;
const unsigned char ln[6] = { 0,0,2,1,0,255 };
cosem_init2((gxObject*)&autoConnect, DLMS_OBJECT_TYPE_AUTO_CONNECT, ln);
autoConnect.mode = DLMS_AUTO_CONNECT_MODE_AUTO_DIALLING_ALLOWED_ANYTIME;
autoConnect.repetitions = 10;
autoConnect.repetitionDelay = 60;
//Calling is allowed between 1am to 6am.
start = (gxtime*)malloc(sizeof(gxtime));
time_init3(start, -1, -1, -1, 1, 0, 0, -1);
end = (gxtime*)malloc(sizeof(gxtime));
time_init3(end, -1, -1, -1, 6, 0, 0, -1);
arr_push(&autoConnect.callingWindow, key_init(start, end));
//Add destination.
str = (gxByteBuffer*)malloc(sizeof(gxByteBuffer));
bb_init(str);
bb_addString(str, "www.gurux.org");
arr_push(&autoConnect.destinations, str);
//How to loop through all calling window items.
gxKey* k;
int pos, ret;
for (pos = 0; pos != object->callingWindow.size; ++pos)
{
    if (pos != 0)
    {
        bb_addString(&ba, ", ");
    }
    ret = arr_getByIndex(&object->callingWindow, pos, (void**)&k);
    if (ret != 0)
    {
        return ret;
    }
    time_print("From: %s", (gxtime*)k->key);
    time_print(" to:%s\r\n",  (gxtime*)k->value);
}
//How to loop through all destinations.
int pos, ret;
gxByteBuffer *dest;
for (pos = 0; pos != object->destinations.size; ++pos)
{
    ret = arr_getByIndex(&object->destinations, pos, (void**)&dest);
    if (ret != 0)
    {
        return ret;
    }
}

Book traversal links for Auto Connect

  • Association Logical Name
  • Up
  • Auto answer
  • Log in or register to post comments
  • Create new account
  • Reset your password

Book navigation

  • Activity calendar
  • Association Logical Name
  • Auto Connect
  • Auto answer
  • Clock
  • Compact data
  • Data
  • Demand register
  • Disconnect control
  • Extended register
  • GPRS modem setup
  • GSM diagnostic
  • IEC HDLC setup
  • IEC local port setup
  • IPv4 setup
  • IPv6 setup
  • Image transfer
  • Limiter
  • M-Bus Client
  • M-Bus master port setup
  • M-Bus slave port setup
  • MAC address setup
  • Modem configuration
  • PPP setup
  • Profile generic
  • Push Setup
  • Register
  • Register Monitor
  • Register activation
  • Register table
  • SAP assignment
  • Script table
  • Security setup
  • Single action schedule
  • Special days table
  • Status mapping
  • Tcp Udp Setup
  • Utility tables

Hire Us!

Latest Releases

Fri, 03/24/2023 - 14:22
gurux.dlms.c 20230324.1
Thu, 03/23/2023 - 11:01
GXDLMSDirector 9.0.2303.2301
Thu, 03/23/2023 - 09:10
Gurux.DLMS.Python 1.0.142
Wed, 03/22/2023 - 13:51
Gurux.DLMS.Net 9.0.2303.2201
Wed, 03/22/2023 - 10:15
gurux.dlms.c 20230322.1

Open bugs

Gurux.DLMS.AMI4
1
Gurux.DLMS.Android
1
gurux.dlms.c
3
gurux.dlms.cpp
3
gurux.dlms.delphi
1
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin