Hi sir,
I have basic information about energy meter like port no,server no,client no,interface type.
I have to read data from energy meter(Apex100 secure) using rs485 medium over TCP/IP DLMS protocol.
My problem is
1.Can i used this ClientServerExample.cpp file? if Yes How can i used ?
mean how can i gave input to this file.
2.Where/How i can deploye(upload) program.
3.Any application files which is used for this?
4.if above point are not valid so how can i read data from dlms smart meter ?
i got following instruction and process but still not geeting how can i used this funcation in my project.
Simple meter reading example http://www.gurux.fi/Gurux.DLMS.Client
I already used GXDLMSDirector software, but i want read values through programming.
Any suggestions / steps/process/documents/existing project anything which is help me too read data from dlms smart meter.
Hi,
ClientServerExample.cpp implements the example meter. If you want to read the meter you need to read it using GuruxDLMSClientExample. Change settings (client and server address) to same what you are using with GXDLMSDirector.
hi sir,
i m running clientServerExample in visual studio2017,but not getting any results
when i debugging i got argc value is eaual to 1.
so its not going inside switch loop.
//this function not going inside switch loop. because getoptr get -1 return from another lib.
while ((opt = getopt(argc, argv, "h:p:c:s:r:it:a:wP:g:S:")) != -1)
{
switch (opt)
{
case 'w':
interfaceType = DLMS_INTERFACE_TYPE_WRAPPER;
break;
case 'r':
if (strcmp("sn", optarg) == 0)
{}
//from here return -1 value because ((optind >= argc) this condition satisfied and return -1.
How to Use ClientServerExample as an application file.
Hi,
ClientServerExample.cpp implements the example meter. If you want to read the meter you need to read it using GuruxDLMSClientExample. Change settings (client and server address) to same what you are using with GXDLMSDirector.
BR,
Mikko
How to Use ClientServerExample as an application file.
hi sir,
i m running clientServerExample in visual studio2017,but not getting any results
when i debugging i got argc value is eaual to 1.
so its not going inside switch loop.
//this function not going inside switch loop. because getoptr get -1 return from another lib.
while ((opt = getopt(argc, argv, "h:p:c:s:r:it:a:wP:g:S:")) != -1)
{
switch (opt)
{
case 'w':
interfaceType = DLMS_INTERFACE_TYPE_WRAPPER;
break;
case 'r':
if (strcmp("sn", optarg) == 0)
{}
//from here return -1 value because ((optind >= argc) this condition satisfied and return -1.
int getopt(int argc, _TCHAR *const argv[], const char *optstring)
{
if ((optind >= argc) || (argv[optind][0] != '-') || (argv[optind][0] == 0))
{
return -1;
}
int opt = argv[optind][1];
const char *p = strchr(optstring, opt);
if (p == 0)
{
return '?';
}
++optind;
if (p[1] == ':')
{
if (optind >= argc)
{
optarg = (char*)p;
return '?';
}
optarg = argv[optind];
++optind;
}
return opt;
}
#endif