private void Alive1() { NotificationContainer MyNotificationContainer = new NotificationContainer(); AliveNotification MyAliveNotification = new AliveNotification(); MyAliveNotification.serverTask_ID = 0; MyAliveNotification.customer_ID = CounterID;// "C11200987654321"; MyAliveNotification.ip_address = "168.223.110.101"; MyAliveNotification.notification_ID = mClount; MyAliveNotification.mac_address = "AB-09-23-ED-F0-88"; MyAliveNotification.timestamp = DateTime.Now; MyNotificationContainer.Item = MyAliveNotification; AnswerContainer MyAnswerContainer; LGJCloudAPIHelper MyLGJCloudAPIHelper = new LGJCloudAPIHelper(); MyAnswerContainer = MyLGJCloudAPIHelper.Notification(MyNotificationContainer); if (MyAnswerContainer != null) { if (MyAnswerContainer.Items[1] != null) { ServerTaskID = MyAnswerContainer.Items[1].serverTask_ID; } OutMessage(MyAnswerContainer.server_response_type.ToString(), 4); } OutPutXMLInfor(MyAnswerContainer.Items); }
private void Startup1() { mClount++; NotificationContainer MyNotificationContainer = new NotificationContainer(); StartupNotification MyStartupNotification = new StartupNotification(); MyStartupNotification.serverTask_ID = 0; MyStartupNotification.customer_ID = CounterID;// "C11200987654321"; MyStartupNotification.ip_address = "168.223.110.101"; MyStartupNotification.notification_ID = mClount; MyStartupNotification.mac_address = "AB-09-23-ED-F0-88"; MyStartupNotification.timestamp = DateTime.Now; MyNotificationContainer.Item = MyStartupNotification; AnswerContainer MyAnswerContainer; LGJCloudAPIHelper MyLGJCloudAPIHelper = new LGJCloudAPIHelper(); MyAnswerContainer = MyLGJCloudAPIHelper.Notification(MyNotificationContainer); if (MyAnswerContainer.Items != null) { ServerTaskID = MyAnswerContainer.Items[0].serverTask_ID; } OutPutXMLInfor(MyAnswerContainer.Items); OutMessage(null, 2); }
private void Count1() { mClount++; NotificationContainer MyNotificationContainer = new NotificationContainer(); CountNotification MyCountNotification = new CountNotification(); MyCountNotification.serverTask_ID = ServerTaskID; MyCountNotification.customer_ID = CounterID;// "C11200987654321"; MyCountNotification.notification_ID = mClount; MyCountNotification.count_in = 1; MyCountNotification.count_out = 1; MyCountNotification.timestamp = DateTime.Now; CountingGateID MyCountingGateID = new CountingGateID(); MyCountingGateID.id = "10"; MyCountNotification.counting_gate_id = MyCountingGateID; MyNotificationContainer.Item = MyCountNotification; AnswerContainer MyAnswerContainer; LGJCloudAPIHelper MyLGJCloudAPIHelper = new LGJCloudAPIHelper(); MyAnswerContainer = MyLGJCloudAPIHelper.Notification(MyNotificationContainer); if (MyAnswerContainer != null) { OutMessage(MyAnswerContainer.server_response_type.ToString(), 4); } OutPutXMLInfor(MyAnswerContainer.Items); }