public bool GetLocation(ref string location) { SDOUpload upload = new SDOUpload(0x2103, 0); this.pendingAction = upload; this.ScheduleAction(this.pendingAction); bool actionResult = this.commEvent.WaitOne(500); if (false != actionResult) { if (null != upload.Data) { location = Encoding.UTF8.GetString(upload.Data); } } return (actionResult); }
public bool GetDeviceNodeId(ref byte deviceId) { SDOUpload upload = new SDOUpload(0x2101, 0); this.pendingAction = upload; this.ScheduleAction(this.pendingAction); bool actionResult = this.commEvent.WaitOne(500); if (false != actionResult) { if (null != upload.Data) { deviceId = upload.Data[0]; } } return (actionResult); }
public bool GetTimeout(ref UInt16 timeout) { SDOUpload upload = new SDOUpload(0x2102, 0); this.pendingAction = upload; this.ScheduleAction(this.pendingAction); bool actionResult = this.commEvent.WaitOne(500); if (false != actionResult) { if (null != upload.Data) { timeout = BitConverter.ToUInt16(upload.Data, 0); } } return (actionResult); }
public bool GetDeviceType(ref UInt32 deviceType) { SDOUpload upload = new SDOUpload(0x1000, 0); this.pendingAction = upload; bool actionResult = this.ExchangeCommAction(this.pendingAction); if (false != actionResult) { if ((null != upload.Data) && (upload.Data.Length >= 4)) { deviceType = BitConverter.ToUInt32(upload.Data, 0); } else { actionResult = false; } } return (actionResult); }
public int GetDeviceBaudRate() { int result = 0; SDOUpload upload = new SDOUpload(0x2100, 0); this.pendingAction = upload; this.ScheduleAction(this.pendingAction); bool actionResult = this.commEvent.WaitOne(500); if (false != actionResult) { if (null != upload.Data) { byte baudCode = upload.Data[0]; if (0 == baudCode) { result = 10000; } else if (1 == baudCode) { result = 20000; } else if (3 == baudCode) { result = 50000; } else if (4 == baudCode) { result = 125000; } else if (5 == baudCode) { result = 250000; } else if (6 == baudCode) { result = 500000; } else if (7 == baudCode) { result = 1000000; } } } return (result); }
public bool GetDrillServoDerivativeControlConstant(ref UInt32 derivativeControlConstant) { bool result = false; SDOUpload upload = new SDOUpload(0x233F, 0); this.pendingAction = upload; bool actionResult = this.ExchangeCommAction(this.pendingAction); if ((false != actionResult) && (null != upload.Data) && (upload.Data.Length >= 4)) { derivativeControlConstant = BitConverter.ToUInt32(upload.Data, 0); result = true; } return (result); }
public bool ReadDeviceVersion(ref string deviceVersion) { bool result = true; SDOUpload upload = new SDOUpload(0x100A, 0); result &= this.ExchangeCommAction(upload); if ((false != result) && (null != upload.Data)) { deviceVersion = Encoding.UTF8.GetString(upload.Data); } return (result); }
public virtual byte[] SDOUpLoad(UInt16 index, byte subIndex) { byte[] result = null; SDOUpload upload = new SDOUpload(index, subIndex); this.pendingAction = upload; this.ScheduleAction(this.pendingAction); this.commEvent.Reset(); bool actionResult = this.commEvent.WaitOne(500); if (false != actionResult) { result = upload.Data; } return (result); }
public bool Read(UInt16 index, byte subIndex, ref UInt16 value) { bool result = true; SDOUpload upload = new SDOUpload(index, subIndex); result &= this.ExchangeCommAction(upload); if ((false != result) && (null != upload.Data) && (2 >= upload.Data.Length)) { value = BitConverter.ToUInt16(upload.Data, 0); } return (result); }
public bool GetDeviceNodeOffset(ref byte nodeOffset) { SDOUpload upload = new SDOUpload(0x2102, 0); this.pendingAction = upload; bool actionResult = this.ExchangeCommAction(this.pendingAction); if (false != actionResult) { if (null != upload.Data) { nodeOffset = upload.Data[0]; } } return (actionResult); }
protected bool ReadSDO(UInt16 index, byte subIndex, ref UInt32 value) { bool result = false; if (null == this.FaultReason) { SDOUpload upload = new SDOUpload(index, subIndex); result = this.ExchangeCommAction(upload); if ((false != result) && (null != upload.Data) && (4 >= upload.Data.Length)) { value = BitConverter.ToUInt32(upload.Data, 0); result = true; } else { result = false; } } return (result); }
public bool GetDrillServoErrorLimit(ref UInt16 errorLimit) { bool result = false; SDOUpload upload = new SDOUpload(0x2344, 0); this.pendingAction = upload; bool actionResult = this.ExchangeCommAction(this.pendingAction); if ((false != actionResult) && (null != upload.Data) && (upload.Data.Length >= 2)) { errorLimit = BitConverter.ToUInt16(upload.Data, 0); result = true; } return (result); }
public bool GetDrillServoTravelVelocity(ref UInt32 travelVelocity) { bool result = false; SDOUpload upload = new SDOUpload(0x2343, 0); this.pendingAction = upload; bool actionResult = this.ExchangeCommAction(this.pendingAction); if ((false != actionResult) && (null != upload.Data) && (upload.Data.Length >= 4)) { travelVelocity = BitConverter.ToUInt32(upload.Data, 0); result = true; } return (result); }
public bool GetDrillServoHomingBackoffCount(ref UInt32 backoffCount) { bool result = false; SDOUpload upload = new SDOUpload(0x2342, 0); this.pendingAction = upload; bool actionResult = this.ExchangeCommAction(this.pendingAction); if ((false != actionResult) && (null != upload.Data) && (upload.Data.Length >= 4)) { backoffCount = BitConverter.ToUInt32(upload.Data, 0); result = true; } return (result); }
public bool GetPowerUpState(ref byte powerUpState) { SDOUpload upload = new SDOUpload(0x2001, 2); this.pendingAction = upload; this.ScheduleAction(this.pendingAction); bool actionResult = this.commEvent.WaitOne(500); if (false != actionResult) { if (null != upload.Data) { powerUpState = upload.Data[0]; } } return (actionResult); }
public bool ReadDeviceType(ref UInt32 deviceType) { bool result = true; SDOUpload upload = new SDOUpload(0x1000, 0); result &= this.ExchangeCommAction(upload); if ((false != result) && (null != upload.Data) && (4 >= upload.Data.Length)) { deviceType = BitConverter.ToUInt32(upload.Data, 0); } return (result); }
public bool GetTimeoutIntensity(ref byte timeoutIntensity) { SDOUpload upload = new SDOUpload(0x2002, 3); this.pendingAction = upload; this.ScheduleAction(this.pendingAction); bool actionResult = this.commEvent.WaitOne(500); if (false != actionResult) { if (null != upload.Data) { timeoutIntensity = upload.Data[0]; } } return (actionResult); }
public bool GetRearDrillServoStatus(ref byte status) { bool result = false; SDOUpload upload = new SDOUpload(0x2347, 0); this.pendingAction = upload; bool actionResult = this.ExchangeCommAction(this.pendingAction); if ((false != actionResult) && (null != upload.Data) && (upload.Data.Length >= 1)) { status = upload.Data[0]; result = true; } return (result); }