private void Device_onConnect(object sender, ActiveCNXConnectionEventArgs e) { IsConnected = true; Messages.Add(new ActivityMessage { Message = "CONNECTED" }); }
void acnxConnection_onConnect(object sender, ActiveCNXConnectionEventArgs e) { this.log.LogEvent("\nConnected"); //this.btnConnect.Enabled = false; //this.btnDisconnect.Enabled = true; this.acnxConnection.UpdateRequest(); }
private void Device_onDisconnect(object sender, ActiveCNXConnectionEventArgs e) { IsConnected = false; Messages.Add(new ActivityMessage { Message = $"DISCONNECTED : {e.DisconnectReasonMessage}" }); }
/// <summary> /// Event Handler for when the connection is broken /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void acnxConnection_onDisconnect(object sender, ActiveCNXConnectionEventArgs e) { logger.Log(string.Format("Disconnect Reason: {0}\r\n", e.DisconnectReasonMessage)); communicationPort.Notify(RoleSignalDigital.RoleName, RoleSignalDigital.OnDisconnectEvent, new List <VParamType>() { new ParamType(e.DisconnectReasonMessage) }); }
/// <summary> /// Event handler that gets triggered when a connection is made with a control system /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void acnxConnection_onConnect(object sender, ActiveCNXConnectionEventArgs e) { logger.Log("Connected\r\n"); /// Send Update Request to the control system. An update request asks for the status of /// ALL attributes defined on the symbol. However, any attribute with a value of 0, or false /// will not be sent. If you have member variables defined that are tied to attribute values, /// make sure those values are zeroed out. logger.Log("Begin Update Request\r\n"); this.acnxConnection.UpdateRequest(); logger.Log("End Update Request\r\n"); }
/// <summary> /// Event handler that gets triggered when a connection is made with a control system /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void acnxConnection_onConnect(object sender, ActiveCNXConnectionEventArgs e) { logger.Log("Connected\r\n"); /// Send Update Request to the control system. An update request asks for the status of /// ALL attributes defined on the symbol. However, any attribute with a value of 0, or false /// will not be sent. If you have member variables defined that are tied to attribute values, /// make sure those values are zeroed out. logger.Log("Begin Update Request\r\n"); this.acnxConnection.UpdateRequest(); logger.Log("End Update Request\r\n"); communicationPort.Notify(RoleSignalDigital.RoleName, RoleSignalDigital.OnConnectEvent, new List <VParamType>() { }); }
void acnxConnection_onDisconnect(object sender, ActiveCNXConnectionEventArgs e) { }
/// <summary> /// Event Handler for when the connection is broken /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void acnxConnection_onDisconnect(object sender, ActiveCNXConnectionEventArgs e) { logger.Log(string.Format("Disconnect Reason: {0}\r\n", e.DisconnectReasonMessage)); }