402 changed files with 250940 additions and 133096 deletions
@ -1,3 +1,7 @@ |
|||
menu "connection app" |
|||
|
|||
menuconfig APPLICATION_CONNECTION |
|||
bool "Using connection apps" |
|||
default n |
|||
|
|||
endmenu |
|||
|
@ -1,3 +1,7 @@ |
|||
SRC_DIR := |
|||
|
|||
ifeq ($(CONFIG_RESOURCES_LWIP),y) |
|||
SRC_DIR += socket_demo |
|||
endif |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
@ -0,0 +1,3 @@ |
|||
SRC_FILES := lwip_tcp_socket_demo.c lwip_udp_socket_demo.c |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
@ -0,0 +1,187 @@ |
|||
/*
|
|||
* Copyright (c) 2020 AIIT XUOS Lab |
|||
* XiUOS is licensed under Mulan PSL v2. |
|||
* You can use this software according to the terms and conditions of the Mulan PSL v2. |
|||
* You may obtain a copy of Mulan PSL v2 at: |
|||
* http://license.coscl.org.cn/MulanPSL2
|
|||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, |
|||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, |
|||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. |
|||
* See the Mulan PSL v2 for more details. |
|||
*/ |
|||
|
|||
/**
|
|||
* @file tcp_echo_socket_demo.c |
|||
* @brief One UDP demo based on LwIP |
|||
* @version 1.0 |
|||
* @author AIIT XUOS Lab |
|||
* @date 2021-05-29 |
|||
*/ |
|||
#include <transform.h> |
|||
#include <xiuos.h> |
|||
#include "board.h" |
|||
#include "sys_arch.h" |
|||
#include <lwip/sockets.h> |
|||
#include "lwip/sys.h" |
|||
|
|||
/*******************************************************************************
|
|||
* Definitions |
|||
******************************************************************************/ |
|||
|
|||
/*******************************************************************************
|
|||
* Prototypes |
|||
******************************************************************************/ |
|||
|
|||
/*******************************************************************************
|
|||
* Variables |
|||
******************************************************************************/ |
|||
|
|||
char tcp_socket_ip[] = {192, 168, 250, 252}; |
|||
|
|||
#define TCP_BUF_SIZE 1024 |
|||
|
|||
/*******************************************************************************
|
|||
* Code |
|||
******************************************************************************/ |
|||
|
|||
static void tcp_recv_demo(void *arg) |
|||
{ |
|||
lw_print("tcp_recv_demo start.\n"); |
|||
|
|||
int fd = -1; |
|||
char *recv_buf; |
|||
struct sockaddr_in tcp_addr, server_addr; |
|||
int recv_len; |
|||
socklen_t addr_len; |
|||
|
|||
while(1) |
|||
{ |
|||
recv_buf = (char *)malloc(TCP_BUF_SIZE); |
|||
if (recv_buf == NULL) |
|||
{ |
|||
lw_print("No memory\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
fd = socket(AF_INET, SOCK_STREAM, 0); |
|||
if (fd < 0) |
|||
{ |
|||
lw_print("Socket error\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
tcp_addr.sin_family = AF_INET; |
|||
tcp_addr.sin_addr.s_addr = INADDR_ANY; |
|||
tcp_addr.sin_port = htons(LOCAL_PORT_SERVER); |
|||
memset(&(tcp_addr.sin_zero), 0, sizeof(tcp_addr.sin_zero)); |
|||
|
|||
if (bind(fd, (struct sockaddr *)&tcp_addr, sizeof(struct sockaddr)) == -1) |
|||
{ |
|||
lw_print("Unable to bind\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
lw_print("tcp bind sucess, start to receive.\n"); |
|||
lw_print("\n\nLocal Port:%d\n\n", LOCAL_PORT_SERVER); |
|||
|
|||
while(1) |
|||
{ |
|||
memset(recv_buf, 0, TCP_BUF_SIZE); |
|||
recv_len = recvfrom(fd, recv_buf, TCP_BUF_SIZE, 0, (struct sockaddr *)&server_addr, &addr_len); |
|||
lw_pr_info("Receive from : %s\n", inet_ntoa(server_addr.sin_addr)); |
|||
lw_pr_info("Receive data : %s\n\n", recv_buf); |
|||
sendto(fd, recv_buf, recv_len, 0, (struct sockaddr*)&server_addr, addr_len); |
|||
} |
|||
|
|||
__exit: |
|||
if (fd >= 0) |
|||
closesocket(fd); |
|||
|
|||
if (recv_buf) |
|||
free(recv_buf); |
|||
} |
|||
} |
|||
|
|||
void tcp_socket_recv_run(int argc, char *argv[]) |
|||
{ |
|||
int result = 0; |
|||
pthread_t th_id; |
|||
pthread_attr_t attr; |
|||
|
|||
if(argc == 2) |
|||
{ |
|||
lw_print("lw: [%s] gw %s\n", __func__, argv[1]); |
|||
sscanf(argv[1], "%d.%d.%d.%d", &tcp_socket_ip[0], &tcp_socket_ip[1], &tcp_socket_ip[2], &tcp_socket_ip[3]); |
|||
} |
|||
|
|||
ETH_BSP_Config(); |
|||
lwip_config_tcp(lwip_ipaddr, lwip_netmask, lwip_gwaddr); |
|||
sys_thread_new("tcp_recv_demo", tcp_recv_demo, NULL, 4096, 15); |
|||
} |
|||
|
|||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(3), |
|||
TCPSocketRecv, tcp_socket_recv_run, TCP recv echo); |
|||
|
|||
static void tcp_send_demo(void *arg) |
|||
{ |
|||
int cnt = TEST_LWIP_TIMES; |
|||
lw_print("tcp_send_demo start.\n"); |
|||
int fd = -1; |
|||
char send_msg[128]; |
|||
|
|||
memset(send_msg, 0, sizeof(send_msg)); |
|||
fd = socket(AF_INET, SOCK_STREAM, 0); |
|||
if (fd < 0) |
|||
{ |
|||
lw_print("Socket error\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
struct sockaddr_in tcp_sock; |
|||
tcp_sock.sin_family = AF_INET; |
|||
tcp_sock.sin_port = htons(TARGET_PORT_CLIENT); |
|||
tcp_sock.sin_addr.s_addr = PP_HTONL(LWIP_MAKEU32(tcp_socket_ip[0],tcp_socket_ip[1],tcp_socket_ip[2],tcp_socket_ip[3])); |
|||
memset(&(tcp_sock.sin_zero), 0, sizeof(tcp_sock.sin_zero)); |
|||
|
|||
if (connect(fd, (struct sockaddr *)&tcp_sock, sizeof(struct sockaddr))) |
|||
{ |
|||
lw_print("Unable to connect\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
lw_print("tcp connect success, start to send.\n"); |
|||
lw_print("\n\nTarget Port:%d\n\n", tcp_sock.sin_port); |
|||
|
|||
while (cnt --) |
|||
{ |
|||
lw_print("Lwip client is running.\n"); |
|||
snprintf(send_msg, sizeof(send_msg), "TCP test package times %d\r\n", cnt); |
|||
sendto(fd, send_msg, strlen(send_msg), 0, (struct sockaddr*)&tcp_sock, sizeof(struct sockaddr)); |
|||
lw_print("Send tcp msg: %s ", send_msg); |
|||
MdelayKTask(1000); |
|||
} |
|||
|
|||
__exit: |
|||
if (fd >= 0) |
|||
closesocket(fd); |
|||
|
|||
return; |
|||
} |
|||
|
|||
|
|||
void tcp_socket_send_run(int argc, char *argv[]) |
|||
{ |
|||
if(argc == 2) |
|||
{ |
|||
lw_print("lw: [%s] gw %s\n", __func__, argv[1]); |
|||
sscanf(argv[1], "%d.%d.%d.%d", &tcp_socket_ip[0], &tcp_socket_ip[1], &tcp_socket_ip[2], &tcp_socket_ip[3]); |
|||
} |
|||
|
|||
ETH_BSP_Config(); |
|||
lwip_config_tcp(lwip_ipaddr, lwip_netmask, lwip_gwaddr); |
|||
sys_thread_new("tcp socket", tcp_send_demo, NULL, 4096, 25); |
|||
} |
|||
|
|||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(0), |
|||
TCPSocketSend, tcp_socket_send_run, TCP send demo); |
|||
|
@ -0,0 +1,209 @@ |
|||
/*
|
|||
* Copyright (c) 2020 AIIT XUOS Lab |
|||
* XiUOS is licensed under Mulan PSL v2. |
|||
* You can use this software according to the terms and conditions of the Mulan PSL v2. |
|||
* You may obtain a copy of Mulan PSL v2 at: |
|||
* http://license.coscl.org.cn/MulanPSL2
|
|||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, |
|||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, |
|||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. |
|||
* See the Mulan PSL v2 for more details. |
|||
*/ |
|||
|
|||
/**
|
|||
* @file lwip_udp_socket_demo.c |
|||
* @brief One UDP demo based on LwIP |
|||
* @version 1.0 |
|||
* @author AIIT XUOS Lab |
|||
* @date 2021-05-29 |
|||
*/ |
|||
#include <transform.h> |
|||
#include <xiuos.h> |
|||
#include "board.h" |
|||
#include "sys_arch.h" |
|||
#include "lwip/udp.h" |
|||
#include "lwip/opt.h" |
|||
|
|||
/*******************************************************************************
|
|||
* Definitions |
|||
******************************************************************************/ |
|||
|
|||
/*******************************************************************************
|
|||
* Prototypes |
|||
******************************************************************************/ |
|||
|
|||
/*******************************************************************************
|
|||
* Variables |
|||
******************************************************************************/ |
|||
extern char udp_target[]; |
|||
static struct udp_pcb *udpecho_raw_pcb; |
|||
char udp_socket_ip[] = {192, 168, 250, 252}; |
|||
|
|||
/*******************************************************************************
|
|||
* Code |
|||
******************************************************************************/ |
|||
|
|||
#include <lwip/sockets.h> |
|||
#include "lwip/sys.h" |
|||
|
|||
#define LWIP_UDP_TASK_STACK 4096 |
|||
#define LWIP_UDP_TASK_PRIO 25 |
|||
#define UDP_BUF_SIZE 1024 |
|||
|
|||
static void udp_recv_demo(void *arg) |
|||
{ |
|||
lw_print("udp_recv_demo start.\n"); |
|||
|
|||
int socket_fd = -1; |
|||
char *recv_buf; |
|||
struct sockaddr_in udp_addr, server_addr; |
|||
int recv_len; |
|||
socklen_t addr_len; |
|||
|
|||
while(1) |
|||
{ |
|||
recv_buf = (char *)malloc(UDP_BUF_SIZE); |
|||
if (recv_buf == NULL) |
|||
{ |
|||
lw_print("No memory\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
socket_fd = socket(AF_INET, SOCK_DGRAM, 0); |
|||
if (socket_fd < 0) |
|||
{ |
|||
lw_print("Socket error\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
udp_addr.sin_family = AF_INET; |
|||
udp_addr.sin_addr.s_addr = INADDR_ANY; |
|||
udp_addr.sin_port = htons(LOCAL_PORT_SERVER); |
|||
memset(&(udp_addr.sin_zero), 0, sizeof(udp_addr.sin_zero)); |
|||
|
|||
if (bind(socket_fd, (struct sockaddr *)&udp_addr, sizeof(struct sockaddr)) == -1) |
|||
{ |
|||
lw_print("Unable to bind\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
lw_print("UDP bind sucess, start to receive.\n"); |
|||
lw_print("\n\nLocal Port:%d\n\n", LOCAL_PORT_SERVER); |
|||
|
|||
while(1) |
|||
{ |
|||
memset(recv_buf, 0, UDP_BUF_SIZE); |
|||
recv_len = recvfrom(socket_fd, recv_buf, UDP_BUF_SIZE, 0, (struct sockaddr *)&server_addr, &addr_len); |
|||
lw_print("Receive from : %s\n", inet_ntoa(server_addr.sin_addr)); |
|||
lw_print("Receive data : %s\n\n", recv_buf); |
|||
sendto(socket_fd, recv_buf, recv_len, 0, (struct sockaddr*)&server_addr, addr_len); |
|||
} |
|||
|
|||
__exit: |
|||
if (socket_fd >= 0) |
|||
closesocket(socket_fd); |
|||
|
|||
if (recv_buf) |
|||
free(recv_buf); |
|||
} |
|||
} |
|||
|
|||
static void udp_recv_demo_thread(void* param) |
|||
{ |
|||
ETH_BSP_Config(); |
|||
lwip_config_tcp(lwip_ipaddr, lwip_netmask, lwip_gwaddr); |
|||
sys_thread_new("udp_recv_demo", udp_recv_demo, NULL, LWIP_UDP_TASK_STACK, LWIP_UDP_TASK_PRIO); |
|||
} |
|||
|
|||
void udp_socket_recv_run(int argc, char *argv[]) |
|||
{ |
|||
int result = 0; |
|||
pthread_t th_id; |
|||
pthread_attr_t attr; |
|||
|
|||
if(argc == 2) |
|||
{ |
|||
lw_print("lw: [%s] gw %s\n", __func__, argv[1]); |
|||
sscanf(argv[1], "%d.%d.%d.%d", &udp_socket_ip[0], &udp_socket_ip[1], &udp_socket_ip[2], &udp_socket_ip[3]); |
|||
} |
|||
|
|||
sys_thread_new("udp socket send", udp_recv_demo_thread, NULL, 4096, 15); |
|||
} |
|||
|
|||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(3), |
|||
UDPSocketRecv, udp_socket_recv_run, UDP recv echo); |
|||
|
|||
static void udp_send_demo(void *arg) |
|||
{ |
|||
int cnt = TEST_LWIP_TIMES; |
|||
char send_str[128]; |
|||
|
|||
lw_print("udp_send_demo start.\n"); |
|||
|
|||
int socket_fd = -1; |
|||
memset(send_str, 0, sizeof(send_str)); |
|||
|
|||
socket_fd = socket(AF_INET, SOCK_DGRAM, 0); |
|||
if (socket_fd < 0) |
|||
{ |
|||
lw_print("Socket error\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
struct sockaddr_in udp_sock; |
|||
udp_sock.sin_family = AF_INET; |
|||
udp_sock.sin_port = htons(TARGET_PORT_CLIENT); |
|||
udp_sock.sin_addr.s_addr = PP_HTONL(LWIP_MAKEU32(udp_target[0],udp_target[1],udp_target[2],udp_target[3])); |
|||
memset(&(udp_sock.sin_zero), 0, sizeof(udp_sock.sin_zero)); |
|||
|
|||
if (connect(socket_fd, (struct sockaddr *)&udp_sock, sizeof(struct sockaddr))) |
|||
{ |
|||
lw_print("Unable to connect\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
lw_print("UDP connect success, start to send.\n"); |
|||
lw_print("\n\nTarget Port:%d\n\n", udp_sock.sin_port); |
|||
|
|||
while (cnt --) |
|||
{ |
|||
snprintf(send_str, sizeof(send_str), "UDP test package times %d\r\n", cnt); |
|||
sendto(socket_fd, send_str, strlen(send_str), 0, (struct sockaddr*)&udp_sock, sizeof(struct sockaddr)); |
|||
lw_pr_info("Send UDP msg: %s ", send_str); |
|||
MdelayKTask(1000); |
|||
} |
|||
|
|||
__exit: |
|||
if (socket_fd >= 0) |
|||
{ |
|||
closesocket(socket_fd); |
|||
} |
|||
|
|||
return; |
|||
} |
|||
|
|||
static void udp_send_demo_thread(void* param) |
|||
{ |
|||
ETH_BSP_Config(); |
|||
lwip_config_tcp(lwip_ipaddr, lwip_netmask, lwip_gwaddr); |
|||
sys_thread_new("udp_send_demo", udp_send_demo, NULL, LWIP_UDP_TASK_STACK, LWIP_UDP_TASK_PRIO); |
|||
} |
|||
|
|||
void udp_socket_send_run(int argc, char *argv[]) |
|||
{ |
|||
int result = 0; |
|||
pthread_t th_id; |
|||
pthread_attr_t attr; |
|||
|
|||
if(argc == 2) |
|||
{ |
|||
lw_print("lw: [%s] gw %s\n", __func__, argv[1]); |
|||
sscanf(argv[1], "%d.%d.%d.%d", &udp_socket_ip[0], &udp_socket_ip[1], &udp_socket_ip[2], &udp_socket_ip[3]); |
|||
} |
|||
|
|||
sys_thread_new("udp socket send", udp_send_demo_thread, NULL, 4096, 15); |
|||
} |
|||
|
|||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(3), |
|||
UDPSocketSend, udp_socket_send_run, UDP send echo); |
|||
|
@ -0,0 +1,11 @@ |
|||
SRC_DIR := |
|||
|
|||
ifeq ($(CONFIG_RESOURCES_LWIP),y) |
|||
|
|||
ifeq ($(CONFIG_USING_CONTROL_PLC_OPCUA), y) |
|||
SRC_DIR += opcua_demo |
|||
endif |
|||
|
|||
endif |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
@ -0,0 +1,3 @@ |
|||
SRC_FILES :=opcua_demo.c |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
@ -0,0 +1,160 @@ |
|||
/*
|
|||
* Copyright (c) 2021 AIIT XUOS Lab |
|||
* XiUOS is licensed under Mulan PSL v2. |
|||
* You can use this software according to the terms and conditions of the Mulan PSL v2. |
|||
* You may obtain a copy of Mulan PSL v2 at: |
|||
* http://license.coscl.org.cn/MulanPSL2
|
|||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, |
|||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, |
|||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. |
|||
* See the Mulan PSL v2 for more details. |
|||
*/ |
|||
|
|||
/**
|
|||
* @file ua_demo.c |
|||
* @brief Demo for OpcUa function |
|||
* @version 1.0 |
|||
* @author AIIT XUOS Lab |
|||
* @date 2021.11.11 |
|||
*/ |
|||
|
|||
#include <list.h> |
|||
#include <transform.h> |
|||
#include "board.h" |
|||
#include <lwip/altcp.h> |
|||
#include "open62541.h" |
|||
#include "ua_api.h" |
|||
|
|||
/*******************************************************************************
|
|||
* Definitions |
|||
******************************************************************************/ |
|||
//#define ua_print KPrintf
|
|||
#define ua_trace() KPrintf("ua: [%s] %d pass!\n", __func__, __LINE__) |
|||
|
|||
#define TCP_LOCAL_PORT 4840 |
|||
|
|||
/*******************************************************************************
|
|||
* Prototypes |
|||
******************************************************************************/ |
|||
|
|||
/*******************************************************************************
|
|||
* Variables |
|||
******************************************************************************/ |
|||
|
|||
const char *test_uri = "opc.tcp://192.168.250.5:4840"; |
|||
const char *test_cb_str = "tcp client connected\r\n"; |
|||
|
|||
char test_ua_gw[] = {192, 168, 250, 5}; |
|||
|
|||
static pthread_t eth_input_id = 0; |
|||
static pthread_t ua_demo_id; |
|||
|
|||
/*******************************************************************************
|
|||
* Code |
|||
******************************************************************************/ |
|||
|
|||
void *test_ua_get_server_info(void *param); |
|||
|
|||
static void test_ua_connect(void *arg) |
|||
{ |
|||
struct netif net; |
|||
UA_StatusCode retval; |
|||
|
|||
UA_Client *client = UA_Client_new(); |
|||
|
|||
if (client == NULL) |
|||
{ |
|||
ua_print("ua: [%s] tcp client null\n", __func__); |
|||
return; |
|||
} |
|||
|
|||
UA_ClientConfig *config = UA_Client_getConfig(client); |
|||
UA_ClientConfig_setDefault(config); |
|||
|
|||
retval = UA_Client_connect(client, test_uri); |
|||
if (retval != UA_STATUSCODE_GOOD) |
|||
{ |
|||
ua_print("ua: [%s] ret %x\n", __func__, retval); |
|||
} |
|||
|
|||
ua_print("ua: [%s] start Ua Test!\n", __func__); |
|||
UA_Client_disconnect(client); |
|||
UA_Client_delete(client); |
|||
} |
|||
|
|||
void test_ua_connect_thr(void *arg) |
|||
{ |
|||
ETH_BSP_Config(); |
|||
lwip_config_tcp(lwip_ipaddr, lwip_netmask, test_ua_gw); |
|||
test_ua_connect(NULL); |
|||
} |
|||
|
|||
void test_sh_ua_connect(void) |
|||
{ |
|||
int result = 0; |
|||
pthread_t th_id; |
|||
pthread_attr_t attr; |
|||
sys_thread_new("ua test", test_ua_connect_thr, NULL, 4096, 15); |
|||
} |
|||
|
|||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(0), |
|||
UaConnect, test_sh_ua_connect, Test Opc UA connection); |
|||
|
|||
void *test_ua_get_server_info(void *param) |
|||
{ |
|||
UA_Client *client = UA_Client_new(); |
|||
|
|||
ua_print("ua: [%s] start ...\n", __func__); |
|||
|
|||
if (client == NULL) |
|||
{ |
|||
ua_print("ua: [%s] tcp client null\n", __func__); |
|||
return NULL; |
|||
} |
|||
|
|||
UA_ClientConfig *config = UA_Client_getConfig(client); |
|||
UA_ClientConfig_setDefault(config); |
|||
|
|||
UA_StatusCode retval = UA_Client_connect(client, OPC_SERVER); |
|||
if(retval != UA_STATUSCODE_GOOD) { |
|||
ua_print("ua: [%s] connect failed %#x\n", __func__, retval); |
|||
UA_Client_delete(client); |
|||
return NULL; |
|||
} |
|||
|
|||
ua_print("ua: [%s] connect ok!\n", __func__); |
|||
|
|||
ua_read_time(client); |
|||
ua_get_server_info(client); |
|||
|
|||
/* Clean up */ |
|||
UA_Client_disconnect(client); |
|||
UA_Client_delete(client); /* Disconnects the client internally */ |
|||
} |
|||
|
|||
void *test_ua_get_server_info_thr(void *arg) |
|||
{ |
|||
ETH_BSP_Config(); |
|||
lwip_config_tcp(lwip_ipaddr, lwip_netmask, test_ua_gw); |
|||
test_ua_get_server_info(NULL); |
|||
} |
|||
|
|||
void *test_sh_ua_get_server_info(void *param) |
|||
{ |
|||
int result = 0; |
|||
pthread_attr_t attr; |
|||
|
|||
attr.schedparam.sched_priority = 15; |
|||
attr.stacksize = 4096; |
|||
|
|||
result = pthread_create(&ua_demo_id, &attr, test_ua_get_server_info_thr, NULL); |
|||
if (0 == result) { |
|||
lw_print("test_ua_get_server_info %d successfully!\n", __func__, ua_demo_id); |
|||
} else { |
|||
lw_print("test_ua_get_server_info failed! error code is %d\n", __func__, result); |
|||
} |
|||
} |
|||
|
|||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(0), |
|||
UaGetInfo, test_sh_ua_get_server_info, Get information from OpcUA server); |
|||
|
@ -1,4 +1,8 @@ |
|||
menuconfig SUPPORT_CONTROL_FRAMEWORK |
|||
bool "support control framework" |
|||
default n |
|||
select TRANSFORM_LAYER_ATTRIUBUTE |
|||
select TRANSFORM_LAYER_ATTRIUBUTE |
|||
|
|||
if SUPPORT_CONTROL_FRAMEWORK |
|||
source "$APP_DIR/Framework/control/plc/interoperability/Kconfig" |
|||
endif |
|||
|
@ -1,3 +1,3 @@ |
|||
SRC_DIR := |
|||
SRC_DIR := shared plc |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
|||
|
@ -0,0 +1,4 @@ |
|||
SRC_DIR := shared interoperability |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
|||
|
@ -0,0 +1,6 @@ |
|||
|
|||
menuconfig USING_CONTROL_PLC_OPCUA |
|||
bool "PLC support OPCUA" |
|||
default y |
|||
depends on RESOURCES_LWIP |
|||
|
@ -0,0 +1,13 @@ |
|||
SRC_DIR := |
|||
|
|||
ifeq ($(CONFIG_RESOURCES_LWIP),y) |
|||
|
|||
ifeq ($(CONFIG_USING_CONTROL_PLC_OPCUA), y) |
|||
SRC_DIR += opcua |
|||
endif |
|||
|
|||
endif |
|||
|
|||
SRC_FILES += interoperability.c |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
@ -0,0 +1,30 @@ |
|||
/*
|
|||
* Copyright (c) 2021 AIIT XUOS Lab |
|||
* XiUOS is licensed under Mulan PSL v2. |
|||
* You can use this software according to the terms and conditions of the Mulan PSL v2. |
|||
* You may obtain a copy of Mulan PSL v2 at: |
|||
* http://license.coscl.org.cn/MulanPSL2
|
|||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, |
|||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, |
|||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. |
|||
* See the Mulan PSL v2 for more details. |
|||
*/ |
|||
|
|||
|
|||
void ctrl_interop_init(void) |
|||
{ |
|||
} |
|||
|
|||
void ctrl_interop_connect(void) |
|||
{ |
|||
} |
|||
|
|||
void ctrl_interop_enable(void) |
|||
{ |
|||
} |
|||
|
|||
void ctrl_interop_disable(void) |
|||
{ |
|||
} |
|||
|
|||
|
@ -0,0 +1,3 @@ |
|||
SRC_FILES := ua_data.c open62541.c ua_client.c ua_server.c |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,25 @@ |
|||
/*
|
|||
* Copyright (c) 2021 AIIT XUOS Lab |
|||
* XiUOS is licensed under Mulan PSL v2. |
|||
* You can use this software according to the terms and conditions of the Mulan PSL v2. |
|||
* You may obtain a copy of Mulan PSL v2 at: |
|||
* http://license.coscl.org.cn/MulanPSL2
|
|||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, |
|||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, |
|||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. |
|||
* See the Mulan PSL v2 for more details. |
|||
*/ |
|||
#ifndef __UA_API_H__ |
|||
#define __UA_API_H__ |
|||
|
|||
#include "open62541.h" |
|||
|
|||
#define OPC_SERVER "opc.tcp://192.168.250.5:4840"
|
|||
#define ua_print printf |
|||
|
|||
int ua_server_connect(void); |
|||
int ua_get_server_info(UA_Client *client); |
|||
void ua_read_time(UA_Client *client); |
|||
int16 ua_test(void); |
|||
|
|||
#endif |
@ -0,0 +1,342 @@ |
|||
/*
|
|||
* Copyright (c) 2021 AIIT XUOS Lab |
|||
* XiUOS is licensed under Mulan PSL v2. |
|||
* You can use this software according to the terms and conditions of the Mulan PSL v2. |
|||
* You may obtain a copy of Mulan PSL v2 at: |
|||
* http://license.coscl.org.cn/MulanPSL2
|
|||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, |
|||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, |
|||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. |
|||
* See the Mulan PSL v2 for more details. |
|||
*/ |
|||
|
|||
#include "open62541.h" |
|||
#include <stdlib.h> |
|||
|
|||
#define OPC_SERVER "opc.tcp://192.168.250.5:4840"
|
|||
#define ua_print printf |
|||
|
|||
#ifdef UA_ENABLE_SUBSCRIPTIONS |
|||
static void handler_TheAnswerChanged(UA_Client *client, UA_UInt32 subId, void *subContext, |
|||
UA_UInt32 monId, void *monContext, UA_DataValue *value) |
|||
{ |
|||
ua_print("The Answer has changed!\n"); |
|||
} |
|||
#endif |
|||
|
|||
static UA_StatusCode nodeIter(UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, void *handle) |
|||
{ |
|||
if(isInverse) |
|||
{ |
|||
return UA_STATUSCODE_GOOD; |
|||
} |
|||
|
|||
UA_NodeId *parent = (UA_NodeId *)handle; |
|||
ua_print("%d, %d --- %d ---> NodeId %d, %d\n", |
|||
parent->namespaceIndex, parent->identifier.numeric, |
|||
referenceTypeId.identifier.numeric, childId.namespaceIndex, |
|||
childId.identifier.numeric); |
|||
|
|||
return UA_STATUSCODE_GOOD; |
|||
} |
|||
|
|||
int ua_get_points(UA_Client *client) |
|||
{ |
|||
/* Listing endpoints */ |
|||
UA_EndpointDescription* endpointArray = NULL; |
|||
size_t endpointArraySize = 0; |
|||
UA_StatusCode retval = UA_Client_getEndpoints(client, OPC_SERVER, |
|||
&endpointArraySize, &endpointArray); |
|||
if(retval != UA_STATUSCODE_GOOD) |
|||
{ |
|||
UA_Array_delete(endpointArray, endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]); |
|||
return EXIT_FAILURE; |
|||
} |
|||
|
|||
ua_print("%i endpoints found\n", (int)endpointArraySize); |
|||
for(size_t i=0;i<endpointArraySize;i++) |
|||
{ |
|||
ua_print("URL of endpoint %i is %.*s\n", (int)i, |
|||
(int)endpointArray[i].endpointUrl.length, |
|||
endpointArray[i].endpointUrl.data); |
|||
} |
|||
UA_Array_delete(endpointArray,endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]); |
|||
return EXIT_SUCCESS; |
|||
} |
|||
|
|||
void ua_browser_objects(UA_Client *client) |
|||
{ |
|||
/* Browse some objects */ |
|||
ua_print("Browsing nodes in objects folder:\n"); |
|||
UA_BrowseRequest bReq; |
|||
UA_BrowseRequest_init(&bReq); |
|||
bReq.requestedMaxReferencesPerNode = 0; |
|||
bReq.nodesToBrowse = UA_BrowseDescription_new(); |
|||
bReq.nodesToBrowseSize = 1; |
|||
bReq.nodesToBrowse[0].nodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER); /* browse objects folder */ |
|||
bReq.nodesToBrowse[0].resultMask = UA_BROWSERESULTMASK_ALL; /* return everything */ |
|||
UA_BrowseResponse bResp = UA_Client_Service_browse(client, bReq); |
|||
ua_print("%-9s %-16s %-16s %-16s\n", "NAMESPACE", "NODEID", "BROWSE NAME", "DISPLAY NAME"); |
|||
for(size_t i = 0; i < bResp.resultsSize; ++i) { |
|||
for(size_t j = 0; j < bResp.results[i].referencesSize; ++j) { |
|||
UA_ReferenceDescription *ref = &(bResp.results[i].references[j]); |
|||
if(ref->nodeId.nodeId.identifierType == UA_NODEIDTYPE_NUMERIC) { |
|||
ua_print("%-9d %-16d %-16.*s %-16.*s\n", ref->nodeId.nodeId.namespaceIndex, |
|||
ref->nodeId.nodeId.identifier.numeric, (int)ref->browseName.name.length, |
|||
ref->browseName.name.data, (int)ref->displayName.text.length, |
|||
ref->displayName.text.data); |
|||
} else if(ref->nodeId.nodeId.identifierType == UA_NODEIDTYPE_STRING) { |
|||
ua_print("%-9d %-16.*s %-16.*s %-16.*s\n", ref->nodeId.nodeId.namespaceIndex, |
|||
(int)ref->nodeId.nodeId.identifier.string.length, |
|||
ref->nodeId.nodeId.identifier.string.data, |
|||
(int)ref->browseName.name.length, ref->browseName.name.data, |
|||
(int)ref->displayName.text.length, ref->displayName.text.data); |
|||
} |
|||
/* TODO: distinguish further types */ |
|||
} |
|||
} |
|||
UA_BrowseRequest_clear(&bReq); |
|||
UA_BrowseResponse_clear(&bResp); |
|||
} |
|||
|
|||
void ua_browser_nodes(UA_Client *client) |
|||
{ |
|||
/* Same thing, this time using the node iterator... */ |
|||
UA_NodeId *parent = UA_NodeId_new(); |
|||
*parent = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER); |
|||
UA_Client_forEachChildNodeCall(client, UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER), |
|||
nodeIter, (void *) parent); |
|||
UA_NodeId_delete(parent); |
|||
} |
|||
|
|||
UA_UInt32 ua_start_sub(UA_Client *client) |
|||
{ |
|||
/* Create a subscription */ |
|||
UA_CreateSubscriptionRequest request = UA_CreateSubscriptionRequest_default(); |
|||
UA_CreateSubscriptionResponse response = UA_Client_Subscriptions_create(client, request, |
|||
NULL, NULL, NULL); |
|||
|
|||
UA_UInt32 subId = response.subscriptionId; |
|||
if(response.responseHeader.serviceResult == UA_STATUSCODE_GOOD) |
|||
ua_print("Create subscription succeeded, id %u\n", subId); |
|||
|
|||
UA_MonitoredItemCreateRequest monRequest = |
|||
UA_MonitoredItemCreateRequest_default(UA_NODEID_STRING(1, "the.answer")); |
|||
|
|||
UA_MonitoredItemCreateResult monResponse = |
|||
UA_Client_MonitoredItems_createDataChange(client, response.subscriptionId, |
|||
UA_TIMESTAMPSTORETURN_BOTH, |
|||
monRequest, NULL, handler_TheAnswerChanged, NULL); |
|||
if(monResponse.statusCode == UA_STATUSCODE_GOOD) |
|||
ua_print("Monitoring 'the.answer', id %u\n", monResponse.monitoredItemId); |
|||
|
|||
|
|||
/* The first publish request should return the initial value of the variable */ |
|||
UA_Client_run_iterate(client, 1000); |
|||
return subId; |
|||
} |
|||
|
|||
void ua_read_attr(UA_Client *client) |
|||
{ |
|||
/* Read attribute */ |
|||
UA_Int32 value = 0; |
|||
ua_print("\nReading the value of node (1, \"the.answer\"):\n"); |
|||
UA_Variant *val = UA_Variant_new(); |
|||
UA_StatusCode retval = UA_Client_readValueAttribute(client, UA_NODEID_STRING(1, "the.answer"), val); |
|||
if(retval == UA_STATUSCODE_GOOD && UA_Variant_isScalar(val) && |
|||
val->type == &UA_TYPES[UA_TYPES_INT32]) { |
|||
value = *(UA_Int32*)val->data; |
|||
ua_print("the value is: %i\n", value); |
|||
} |
|||
UA_Variant_delete(val); |
|||
|
|||
/* Write node attribute */ |
|||
value++; |
|||
ua_print("\nWriting a value of node (1, \"the.answer\"):\n"); |
|||
UA_WriteRequest wReq; |
|||
UA_WriteRequest_init(&wReq); |
|||
wReq.nodesToWrite = UA_WriteValue_new(); |
|||
wReq.nodesToWriteSize = 1; |
|||
wReq.nodesToWrite[0].nodeId = UA_NODEID_STRING_ALLOC(1, "the.answer"); |
|||
wReq.nodesToWrite[0].attributeId = UA_ATTRIBUTEID_VALUE; |
|||
wReq.nodesToWrite[0].value.hasValue = true; |
|||
wReq.nodesToWrite[0].value.value.type = &UA_TYPES[UA_TYPES_INT32]; |
|||
wReq.nodesToWrite[0].value.value.storageType = UA_VARIANT_DATA_NODELETE; /* do not free the integer on deletion */ |
|||
wReq.nodesToWrite[0].value.value.data = &value; |
|||
UA_WriteResponse wResp = UA_Client_Service_write(client, wReq); |
|||
if(wResp.responseHeader.serviceResult == UA_STATUSCODE_GOOD) |
|||
ua_print("the new value is: %i\n", value); |
|||
UA_WriteRequest_clear(&wReq); |
|||
UA_WriteResponse_clear(&wResp); |
|||
|
|||
/* Write node attribute (using the highlevel API) */ |
|||
value++; |
|||
UA_Variant *myVariant = UA_Variant_new(); |
|||
UA_Variant_setScalarCopy(myVariant, &value, &UA_TYPES[UA_TYPES_INT32]); |
|||
UA_Client_writeValueAttribute(client, UA_NODEID_STRING(1, "the.answer"), myVariant); |
|||
UA_Variant_delete(myVariant); |
|||
|
|||
} |
|||
|
|||
void ua_call_remote(UA_Client *client) |
|||
{ |
|||
/* Call a remote method */ |
|||
UA_Variant input; |
|||
UA_String argString = UA_STRING("Hello Server"); |
|||
UA_Variant_init(&input); |
|||
UA_Variant_setScalarCopy(&input, &argString, &UA_TYPES[UA_TYPES_STRING]); |
|||
size_t outputSize; |
|||
UA_Variant *output; |
|||
UA_StatusCode retval = UA_Client_call(client, UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER), |
|||
UA_NODEID_NUMERIC(1, 62541), 1, &input, &outputSize, &output); |
|||
if(retval == UA_STATUSCODE_GOOD) { |
|||
ua_print("Method call was successful, and %lu returned values available.\n", |
|||
(unsigned long)outputSize); |
|||
UA_Array_delete(output, outputSize, &UA_TYPES[UA_TYPES_VARIANT]); |
|||
} else { |
|||
ua_print("Method call was unsuccessful, and %x returned values available.\n", retval); |
|||
} |
|||
UA_Variant_clear(&input); |
|||
} |
|||
|
|||
|
|||
void ua_add_nodes(UA_Client *client) |
|||
{ |
|||
/* Add new nodes*/ |
|||
/* New ReferenceType */ |
|||
UA_NodeId ref_id; |
|||
UA_ReferenceTypeAttributes ref_attr = UA_ReferenceTypeAttributes_default; |
|||
ref_attr.displayName = UA_LOCALIZEDTEXT("en-US", "NewReference"); |
|||
ref_attr.description = UA_LOCALIZEDTEXT("en-US", "References something that might or might not exist"); |
|||
ref_attr.inverseName = UA_LOCALIZEDTEXT("en-US", "IsNewlyReferencedBy"); |
|||
UA_StatusCode retval = UA_Client_addReferenceTypeNode(client, |
|||
UA_NODEID_NUMERIC(1, 12133), |
|||
UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), |
|||
UA_NODEID_NUMERIC(0, UA_NS0ID_HASSUBTYPE), |
|||
UA_QUALIFIEDNAME(1, "NewReference"), |
|||
ref_attr, &ref_id); |
|||
if(retval == UA_STATUSCODE_GOOD ) |
|||
ua_print("Created 'NewReference' with numeric NodeID %u\n", ref_id.identifier.numeric); |
|||
|
|||
/* New ObjectType */ |
|||
UA_NodeId objt_id; |
|||
UA_ObjectTypeAttributes objt_attr = UA_ObjectTypeAttributes_default; |
|||
objt_attr.displayName = UA_LOCALIZEDTEXT("en-US", "TheNewObjectType"); |
|||
objt_attr.description = UA_LOCALIZEDTEXT("en-US", "Put innovative description here"); |
|||
retval = UA_Client_addObjectTypeNode(client, |
|||
UA_NODEID_NUMERIC(1, 12134), |
|||
UA_NODEID_NUMERIC(0, UA_NS0ID_BASEOBJECTTYPE), |
|||
UA_NODEID_NUMERIC(0, UA_NS0ID_HASSUBTYPE), |
|||
UA_QUALIFIEDNAME(1, "NewObjectType"), |
|||
objt_attr, &objt_id); |
|||
if(retval == UA_STATUSCODE_GOOD) |
|||
ua_print("Created 'NewObjectType' with numeric NodeID %u\n", objt_id.identifier.numeric); |
|||
|
|||
/* New Object */ |
|||
UA_NodeId obj_id; |
|||
UA_ObjectAttributes obj_attr = UA_ObjectAttributes_default; |
|||
obj_attr.displayName = UA_LOCALIZEDTEXT("en-US", "TheNewGreatNode"); |
|||
obj_attr.description = UA_LOCALIZEDTEXT("de-DE", "Hier koennte Ihre Webung stehen!"); |
|||
retval = UA_Client_addObjectNode(client, |
|||
UA_NODEID_NUMERIC(1, 0), |
|||
UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER), |
|||
UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), |
|||
UA_QUALIFIEDNAME(1, "TheGreatNode"), |
|||
UA_NODEID_NUMERIC(1, 12134), |
|||
obj_attr, &obj_id); |
|||
if(retval == UA_STATUSCODE_GOOD ) |
|||
ua_print("Created 'NewObject' with numeric NodeID %u\n", obj_id.identifier.numeric); |
|||
|
|||
/* New Integer Variable */ |
|||
UA_NodeId var_id; |
|||
UA_VariableAttributes var_attr = UA_VariableAttributes_default; |
|||
var_attr.displayName = UA_LOCALIZEDTEXT("en-US", "TheNewVariableNode"); |
|||
var_attr.description = |
|||
UA_LOCALIZEDTEXT("en-US", "This integer is just amazing - it has digits and everything."); |
|||
UA_Int32 int_value = 1234; |
|||
/* This does not copy the value */ |
|||
UA_Variant_setScalar(&var_attr.value, &int_value, &UA_TYPES[UA_TYPES_INT32]); |
|||
var_attr.dataType = UA_TYPES[UA_TYPES_INT32].typeId; |
|||
retval = UA_Client_addVariableNode(client, |
|||
UA_NODEID_NUMERIC(1, 0), // Assign new/random NodeID
|
|||
UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER), |
|||
UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), |
|||
UA_QUALIFIEDNAME(0, "VariableNode"), |
|||
UA_NODEID_NULL, // no variable type
|
|||
var_attr, &var_id); |
|||
if(retval == UA_STATUSCODE_GOOD ) |
|||
ua_print("Created 'NewVariable' with numeric NodeID %u\n", var_id.identifier.numeric); |
|||
|
|||
} |
|||
|
|||
int ua_get_server_info(UA_Client *client) |
|||
{ |
|||
UA_StatusCode retval; |
|||
|
|||
/* Listing endpoints */ |
|||
retval = ua_get_points(client); |
|||
if(retval != UA_STATUSCODE_GOOD) { |
|||
UA_Client_delete(client); |
|||
return EXIT_FAILURE; |
|||
} |
|||
|
|||
/* Connect to a server */ |
|||
/* anonymous connect would be: retval = UA_Client_connect(client, "opc.tcp://localhost:4840"); */ |
|||
retval = UA_Client_connect(client, OPC_SERVER); |
|||
if(retval != UA_STATUSCODE_GOOD) { |
|||
UA_Client_delete(client); |
|||
return EXIT_FAILURE; |
|||
} |
|||
|
|||
ua_browser_objects(client); |
|||
|
|||
/* Same thing, this time using the node iterator... */ |
|||
ua_browser_nodes(client); |
|||
|
|||
#ifdef UA_ENABLE_SUBSCRIPTIONS |
|||
UA_Int32 subId = ua_start_sub(client); |
|||
#endif |
|||
|
|||
ua_read_attr(client); |
|||
|
|||
#ifdef UA_ENABLE_SUBSCRIPTIONS |
|||
/* Take another look at the.answer */ |
|||
UA_Client_run_iterate(client, 100); |
|||
/* Delete the subscription */ |
|||
if(UA_Client_Subscriptions_deleteSingle(client, subId) == UA_STATUSCODE_GOOD) |
|||
ua_print("Subscription removed\n"); |
|||
#endif |
|||
|
|||
#ifdef UA_ENABLE_METHODCALLS |
|||
ua_call_remote(client); |
|||
#endif |
|||
|
|||
#ifdef UA_ENABLE_NODEMANAGEMENT |
|||
ua_add_nodes(client); |
|||
#endif |
|||
|
|||
return EXIT_SUCCESS; |
|||
} |
|||
|
|||
void ua_read_time(UA_Client *client) |
|||
{ |
|||
/* Read the value attribute of the node. UA_Client_readValueAttribute is a
|
|||
* wrapper for the raw read service available as UA_Client_Service_read. */ |
|||
UA_Variant value; /* Variants can hold scalar values and arrays of any type */ |
|||
UA_Variant_init(&value); |
|||
|
|||
/* NodeId of the variable holding the current time */ |
|||
const UA_NodeId nodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_SERVER_SERVERSTATUS_CURRENTTIME); |
|||
UA_StatusCode retval = UA_Client_readValueAttribute(client, nodeId, &value); |
|||
|
|||
if(retval == UA_STATUSCODE_GOOD && UA_Variant_hasScalarType(&value, &UA_TYPES[UA_TYPES_DATETIME])) |
|||
{ |
|||
UA_DateTime raw_date = *(UA_DateTime *) value.data; |
|||
UA_DateTimeStruct dts = UA_DateTime_toStruct(raw_date); |
|||
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "date is: %u-%u-%u %u:%u:%u.%03u\n", |
|||
dts.day, dts.month, dts.year, dts.hour, dts.min, dts.sec, dts.milliSec); |
|||
} |
|||
/* Clean up */ |
|||
UA_Variant_clear(&value); |
|||
} |
|||
|
@ -0,0 +1,201 @@ |
|||
#include "open62541.h" |
|||
|
|||
/* Opc.Ua - ns=0;i=7617 */ |
|||
const UA_Byte variablenode_ns_0_i_7617_variant_DataContents_byteArray[177218] = {60, 111, 112, 99, 58, 84, 121, 112, 101, 68, 105, 99, 116, 105, 111, 110, 97, 114, 121, 13, 10, 32, 32, 120, 109, 108, 110, 115, 58, 111, 112, 99, 61, 34, 104, 116, 116, 112, 58, 47, 47, 111, 112, 99, 102, 111, 117, 110, 100, 97, 116, 105, 111, 110, 46, 111, 114, 103, 47, 66, 105, 110, 97, 114, 121, 83, 99, 104, 101, 109, 97, 47, 34, 13, 10, 32, 32, 120, 109, 108, 110, 115, 58, 120, 115, 105, 61, 34, 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 119, 51, 46, 111, 114, 103, 47, 50, 48, 48, 49, 47, 88, 77, 76, 83, 99, 104, 101, 109, 97, 45, 105, 110, 115, 116, 97, 110, 99, 101, 34, 13, 10, 32, 32, 120, 109, 108, 110, 115, 58, 117, 97, 61, 34, 104, 116, 116, 112, 58, 47, 47, 111, 112, 99, 102, 111, 117, 110, 100, 97, 116, 105, 111, 110, 46, 111, 114, 103, 47, 85, 65, 47, 34, 13, 10, 32, 32, 120, 109, 108, 110, 115, 58, 116, 110, 115, 61, 34, 104, 116, 116, 112, 58, 47, 47, 111, 112, 99, 102, 111, 117, 110, 100, 97, 116, 105, 111, 110, 46, 111, 114, 103, 47, 85, 65, 47, 34, 13, 10, 32, 32, 68, 101, 102, 97, 117, 108, 116, 66, 121, 116, 101, 79, 114, 100, 101, 114, 61, 34, 76, 105, 116, 116, 108, 101, 69, 110, 100, 105, 97, 110, 34, 13, 10, 32, 32, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 61, 34, 104, 116, 116, 112, 58, 47, 47, 111, 112, 99, 102, 111, 117, 110, 100, 97, 116, 105, 111, 110, 46, 111, 114, 103, 47, 85, 65, 47, 34, 13, 10, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 73, 109, 112, 111, 114, 116, 32, 78, 97, 109, 101, 115, 112, 97, 99, 101, 61, 34, 104, 116, 116, 112, 58, 47, 47, 111, 112, 99, 102, 111, 117, 110, 100, 97, 116, 105, 111, 110, 46, 111, 114, 103, 47, 66, 105, 110, 97, 114, 121, 83, 99, 104, 101, 109, 97, 47, 34, 32, 47, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 88, 109, 108, 69, 108, 101, 109, 101, 110, 116, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 65, 110, 32, 88, 77, 76, 32, 101, 108, 101, 109, 101, 110, 116, 32, 101, 110, 99, 111, 100, 101, 100, 32, 97, 115, 32, 97, 32, 85, 84, 70, 45, 56, 32, 115, 116, 114, 105, 110, 103, 46, 60, 47, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 76, 101, 110, 103, 116, 104, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 73, 110, 116, 51, 50, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 86, 97, 108, 117, 101, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 67, 104, 97, 114, 34, 32, 76, 101, 110, 103, 116, 104, 70, 105, 101, 108, 100, 61, 34, 76, 101, 110, 103, 116, 104, 34, 32, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 69, 110, 117, 109, 101, 114, 97, 116, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 76, 101, 110, 103, 116, 104, 73, 110, 66, 105, 116, 115, 61, 34, 54, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 84, 104, 101, 32, 112, 111, 115, 115, 105, 98, 108, 101, 32, 101, 110, 99, 111, 100, 105, 110, 103, 115, 32, 102, 111, 114, 32, 97, 32, 78, 111, 100, 101, 73, 100, 32, 118, 97, 108, 117, 101, 46, 60, 47, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 69, 110, 117, 109, 101, 114, 97, 116, 101, 100, 86, 97, 108, 117, 101, 32, 78, 97, 109, 101, 61, 34, 84, 119, 111, 66, 121, 116, 101, 34, 32, 86, 97, 108, 117, 101, 61, 34, 48, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 69, 110, 117, 109, 101, 114, 97, 116, 101, 100, 86, 97, 108, 117, |
|||
101, 32, 78, 97, 109, 101, 61, 34, 70, 111, 117, 114, 66, 121, 116, 101, 34, 32, 86, 97, 108, 117, 101, 61, 34, 49, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 69, 110, 117, 109, 101, 114, 97, 116, 101, 100, 86, 97, 108, 117, 101, 32, 78, 97, 109, 101, 61, 34, 78, 117, 109, 101, 114, 105, 99, 34, 32, 86, 97, 108, 117, 101, 61, 34, 50, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 69, 110, 117, 109, 101, 114, 97, 116, 101, 100, 86, 97, 108, 117, 101, 32, 78, 97, 109, 101, 61, 34, 83, 116, 114, 105, 110, 103, 34, 32, 86, 97, 108, 117, 101, 61, 34, 51, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 69, 110, 117, 109, 101, 114, 97, 116, 101, 100, 86, 97, 108, 117, 101, 32, 78, 97, 109, 101, 61, 34, 71, 117, 105, 100, 34, 32, 86, 97, 108, 117, 101, 61, 34, 52, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 69, 110, 117, 109, 101, 114, 97, 116, 101, 100, 86, 97, 108, 117, 101, 32, 78, 97, 109, 101, 61, 34, 66, 121, 116, 101, 83, 116, 114, 105, 110, 103, 34, 32, 86, 97, 108, 117, 101, 61, 34, 53, 34, 32, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 69, 110, 117, 109, 101, 114, 97, 116, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 84, 119, 111, 66, 121, 116, 101, 78, 111, 100, 101, 73, 100, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 66, 121, 116, 101, 34, 32, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 70, 111, 117, 114, 66, 121, 116, 101, 78, 111, 100, 101, 73, 100, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 97, 109, 101, 115, 112, 97, 99, 101, 73, 110, 100, 101, 120, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 66, 121, 116, 101, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 85, 73, 110, 116, 49, 54, 34, 32, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 78, 117, 109, 101, 114, 105, 99, 78, 111, 100, 101, 73, 100, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 97, 109, 101, 115, 112, 97, 99, 101, 73, 110, 100, 101, 120, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 85, 73, 110, 116, 49, 54, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 85, 73, 110, 116, 51, 50, 34, 32, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 83, 116, 114, 105, 110, 103, 78, 111, 100, 101, 73, 100, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 97, 109, 101, 115, 112, 97, 99, 101, 73, 110, 100, 101, 120, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 85, 73, 110, 116, 49, 54, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34 |
|||
, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 67, 104, 97, 114, 65, 114, 114, 97, 121, 34, 32, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 71, 117, 105, 100, 78, 111, 100, 101, 73, 100, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 97, 109, 101, 115, 112, 97, 99, 101, 73, 110, 100, 101, 120, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 85, 73, 110, 116, 49, 54, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 71, 117, 105, 100, 34, 32, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 66, 121, 116, 101, 83, 116, 114, 105, 110, 103, 78, 111, 100, 101, 73, 100, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 97, 109, 101, 115, 112, 97, 99, 101, 73, 110, 100, 101, 120, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 85, 73, 110, 116, 49, 54, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 66, 121, 116, 101, 83, 116, 114, 105, 110, 103, 34, 32, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 78, 111, 100, 101, 73, 100, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 65, 110, 32, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 32, 102, 111, 114, 32, 97, 32, 110, 111, 100, 101, 32, 105, 110, 32, 97, 32, 85, 65, 32, 115, 101, 114, 118, 101, 114, 32, 97, 100, 100, 114, 101, 115, 115, 32, 115, 112, 97, 99, 101, 46, 60, 47, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 82, 101, 115, 101, 114, 118, 101, 100, 49, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 66, 105, 116, 34, 32, 76, 101, 110, 103, 116, 104, 61, 34, 50, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 84, 119, 111, 66, 121, 116, 101, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 84, 119, 111, 66, 121, 116, 101, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 48, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 70, 111, 117, 114, 66, 121, 116, 101, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 70, 111, 117, 114, 66, 121, 116, 101, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34 |
|||
, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 49, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 117, 109, 101, 114, 105, 99, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 78, 117, 109, 101, 114, 105, 99, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 50, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 83, 116, 114, 105, 110, 103, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 83, 116, 114, 105, 110, 103, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 51, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 71, 117, 105, 100, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 71, 117, 105, 100, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 52, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 66, 121, 116, 101, 83, 116, 114, 105, 110, 103, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 66, 121, 116, 101, 83, 116, 114, 105, 110, 103, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 53, 34, 32, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 69, 120, 112, 97, 110, 100, 101, 100, 78, 111, 100, 101, 73, 100, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 65, 110, 32, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 32, 102, 111, 114, 32, 97, 32, 110, 111, 100, 101, 32, 105, 110, 32, 97, 32, 85, 65, 32, 115, 101, 114, 118, 101, 114, 32, 97, 100, 100, 114, 101, 115, 115, 32, 115, 112, 97, 99, 101, 32, 113, 117, 97, 108, 105, 102, 105, 101, 100, 32, 119, 105, 116, 104, 32, 97, 32, 99, 111, 109, 112, 108, 101, 116, 101, 32, 110, 97, 109, 101, 115, 112, 97, 99, 101, 32, 115, 116, 114, 105, 110, 103, 46, 60, 47, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 83, 101, 114, 118, 101, 114, 73, 110, 100, 101, 120, 83, 112, 101, 99, 105, 102, 105, 101, 100, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 66, 105, 116, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 97, 109, 101, 115, 112, 97, 99, 101, 85, 82, 73, 83, 112, 101, 99, 105, 102, 105, 101, 100, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 66, 105, 116, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 84, 119, 111, 66, 121, 116, 101, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 84, 119, 111, 66, 121, 116, 101, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, |
|||
101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 48, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 70, 111, 117, 114, 66, 121, 116, 101, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 70, 111, 117, 114, 66, 121, 116, 101, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 49, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 117, 109, 101, 114, 105, 99, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 78, 117, 109, 101, 114, 105, 99, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 50, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 83, 116, 114, 105, 110, 103, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 83, 116, 114, 105, 110, 103, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 51, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 71, 117, 105, 100, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 71, 117, 105, 100, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 52, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 66, 121, 116, 101, 83, 116, 114, 105, 110, 103, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 117, 97, 58, 66, 121, 116, 101, 83, 116, 114, 105, 110, 103, 78, 111, 100, 101, 73, 100, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 111, 100, 101, 73, 100, 84, 121, 112, 101, 34, 32, 83, 119, 105, 116, 99, 104, 86, 97, 108, 117, 101, 61, 34, 53, 34, 32, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 78, 97, 109, 101, 115, 112, 97, 99, 101, 85, 82, 73, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 67, 104, 97, 114, 65, 114, 114, 97, 121, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 78, 97, 109, 101, 115, 112, 97, 99, 101, 85, 82, 73, 83, 112, 101, 99, 105, 102, 105, 101, 100, 34, 47, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 70, 105, 101, 108, 100, 32, 78, 97, 109, 101, 61, 34, 83, 101, 114, 118, 101, 114, 73, 110, 100, 101, 120, 34, 32, 84, 121, 112, 101, 78, 97, 109, 101, 61, 34, 111, 112, 99, 58, 85, 73, 110, 116, 51, 50, 34, 32, 83, 119, 105, 116, 99, 104, 70, 105, 101, 108, 100, 61, 34, 83, 101, 114, 118, 101, 114, 73, 110, 100, 101, 120, 83, 112, 101, 99, 105, 102, 105, 101, 100, 34, 47, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 79, 112, 97, 113, 117, 101, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 83, 116, 97, 116, 117, 115, 67, 111, 100, 101, 34, 32, 76, 101, 110, 103, 116, 104, 73, 110, 66, 105, 116, 115, 61, 34, 51, 50, 34, 32, 66, 121, 116, 101, 79, 114, 100, 101, 114, 83, 105, 103, 110, 105, 102, 105, 99, 97, 110, 116, 61, 34, 116, 114, 117, 101, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 65, 32, 51, 50, 45, 98, 105, 116, 32, 115, 116, 97, 116, 117, 115, 32, 99, 111, 100, 101, 32, 118, 97, 108, 117, 101, 46, 60, 47, 111, |
|||
112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 13, 10, 32, 32, 60, 47, 111, 112, 99, 58, 79, 112, 97, 113, 117, 101, 84, 121, 112, 101, 62, 13, 10, 13, 10, 32, 32, 60, 111, 112, 99, 58, 83, 116, 114, 117, 99, 116, 117, 114, 101, 100, 84, 121, 112, 101, 32, 78, 97, 109, 101, 61, 34, 68, 105, 97, 103, 110, 111, 115, 116, 105, 99, 73, 110, 102, 111, 34, 62, 13, 10, 32, 32, 32, 32, 60, 111, 112, 99, 58, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 62, 65, 32, 114, 101, 99, 117, 114, 115, 105, 118, 101, 32, 115, 116, 114, 117, 99, 116, 117, 114< |