private int ArmPositionCallBack(Header header, ABSPacket packet, CommNode node) { //display arm position need to invoke becuase this is an internal thread and is unsafe //only need to invoke once all will require an invoke if (lblBase_pp.InvokeRequired) { lblBase_pp.Invoke(new MethodInvoker(() => { ArmPositionCallBack(header, packet, node); })); } else { NGCP.ArmPosition armPosition = ABSPacket.GetValue <NGCP.ArmPosition>(packet); lblBase_pp.Text = armPosition.position1.ToString(); } return((Int32)(CallBackCodes.CALLBACK_SUCCESS | CallBackCodes.CALLBACK_DESTROY_PACKET)); }
public void SendArmPosition(int position1, int position2, int position3, int position4, byte id = 1) { NGCP.ArmPosition ap = new NGCP.ArmPosition(position1, position2, position3, position4); Node.Send(ap, id); }