41#include "OPCprotocolManager.h"
82 printf(
"\nq: quit\n");
83 printf(
"0: ........\n");
84 printf(
"1: ........\n");
85 printf(
"2: ........\n");
86 printf(
"3: ........\n");
87 printf(
"4: ........\n");
88 printf(
"5: ........\n");
95 uint32_t ip1,ip2,ip3,ip4, address=0;
97 printf(
"Insert destination host: x.x.x.x ");
98 scanf(
"%s", &addrstr[0]);
99 sscanf(addrstr,
"%d.%d.%d.%d",&ip1,&ip2,&ip3,&ip4);
100 address = (ip1<<24)|(ip2<<16)|(ip3<<8)|ip4 ;
106int32_t
callback_button_x(uint8_t *payload_ptr, uint32_t payload_size, ACE_INET_Addr *addr, int16_t
id)
108 printf(
"button %d\n",
id);
112 opcprotman_res_t res;
114 addr->set(4444, dest_addr);
118 printf(
"opcMan_ptr is NULL\n");
122 res = opcprotman_Form(
opcMan_ptr, opcprotman_opc_ask,
id, NULL , (opcprotman_message_t*)payload_ptr, &size);
123 if(opcprotman_OK != res)
126 printf(
"erron in former\n");
129 printf(
"in button %d : size=%d \n",
id, size);
145 addr->set(4444, dest_addr);