|
API C#
|
This class represents all the method you need to access diagnostic data from JACO. From this class you can access and manage errors stored in JACO and all information from the class CPosition. More...
Public Member Functions | |
| CJacoDiagnosticDataManagerRemote (CCypherMessage encryptedPass) | |
| Initializes a new instance of the CJacoDiagnosticDataManager class. Developper that use that API should never have to declare an object of this class because you can access it via the object CJacoArm. More... | |
| ulong | GetErrorLogCount (CProductJaco jaco) |
| Get the error log count. More... | |
| int | GetPositionLogCount (CProductJaco jaco) |
| Gets a list of all the error from Jaco. More... | |
| CCaptorsInfo | GetSensorsInfo (CProductJaco jaco) |
| Gets information about Jaco's sensors. More... | |
| CPosition | GetPositionFromJaco (CProductJaco jaco, int index) |
| Gets all the positions from jaco. Check the position count before calling this method because the transfer can be very long. You may consider GetPositionsFromJaco(int start, int end) to choose a range of positions. More... | |
| CPeripheralInformation | GetPeripheralInformationFromJaco (CProductJaco jaco) |
| Gets the peripheal information from jaco. More... | |
| CPosition | GetPositionLogLiveFromJaco (CProductJaco jaco) |
| Gets positions from jaco in a specific range. More... | |
| double | RealSpeedTest (CProductJaco jaco) |
| Execute a speed test of the USB connection. More... | |
| void | DeleteErrorLog (CProductJaco jaco) |
| Delete the error log. More... | |
This class represents all the method you need to access diagnostic data from JACO. From this class you can access and manage errors stored in JACO and all information from the class CPosition.
| Kinova.API.Jaco.Diagnostic.CJacoDiagnosticDataManagerRemote.CJacoDiagnosticDataManagerRemote | ( | CCypherMessage | encryptedPass | ) |
Initializes a new instance of the CJacoDiagnosticDataManager class. Developper that use that API should never have to declare an object of this class because you can access it via the object CJacoArm.
| encryptedPass | The encrypted pass. |
| void Kinova.API.Jaco.Diagnostic.CJacoDiagnosticDataManagerRemote.DeleteErrorLog | ( | CProductJaco | jaco | ) |
Delete the error log.
try { CCypherMessage cypherPass;
//MyValidPassword is a string containing the password. cypherPass = Crypto.GetInstance().Encrypt(MyValidPassword); CJacoArm m_Jaco = new CJacoArm(cypherPass);
if (m_Jaco.JacoIsReady()) {
m_Jaco.DiagnosticManager.DataManager.DeleteErrorLog();
} } catch (Exception ex) { System.Console.WriteLine("EXCEPTION"); }
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |
| ulong Kinova.API.Jaco.Diagnostic.CJacoDiagnosticDataManagerRemote.GetErrorLogCount | ( | CProductJaco | jaco | ) |
Get the error log count.
try { CCypherMessage cypherPass;
//MyValidPassword is a string containing the password. cypherPass = Crypto.GetInstance().Encrypt(MyValidPassword); CJacoArm m_Jaco = new CJacoArm(cypherPass);
if (m_Jaco.JacoIsReady()) {
ulong Count = m_Jaco.DiagnosticManager.DataManager.GetErrorLogCount();
System.Console.WriteLine("Error count : " + Count);
} } catch (Exception ex) { System.Console.WriteLine("EXCEPTION"); }
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |
| CPeripheralInformation Kinova.API.Jaco.Diagnostic.CJacoDiagnosticDataManagerRemote.GetPeripheralInformationFromJaco | ( | CProductJaco | jaco | ) |
Gets the peripheal information from jaco.
try { CCypherMessage cypherPass;
//MyValidPassword is a string containing the password. cypherPass = Crypto.GetInstance().Encrypt(MyValidPassword); CJacoArm m_Jaco = new CJacoArm(cypherPass);
if (m_Jaco.JacoIsReady()) { CPeripheralInformation info = m_Jaco.DiagnosticManager.DataManager.GetPeripheralInformationFromJaco();
System.Console.WriteLine("Device ID : " + info.DeviceID); } } catch (Exception ex) { System.Console.WriteLine("EXCEPTION"); }
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |
| CPosition Kinova.API.Jaco.Diagnostic.CJacoDiagnosticDataManagerRemote.GetPositionFromJaco | ( | CProductJaco | jaco, |
| int | index | ||
| ) |
Gets all the positions from jaco. Check the position count before calling this method because the transfer can be very long. You may consider GetPositionsFromJaco(int start, int end) to choose a range of positions.
try { CCypherMessage cypherPass;
//MyValidPassword is a string containing the password. cypherPass = Crypto.GetInstance().Encrypt(MyValidPassword); CJacoArm m_Jaco = new CJacoArm(cypherPass);
if (m_Jaco.JacoIsReady()) { //A list to store the positions from Jaco. List<CPosition> list = new List<CPosition>();
//Get the index of the last recorded position. int index = m_Jaco.DiagnosticManager.DataManager.GetPositionLogCount();
//Loop until you get the last 50 positions for (int i = index; i > index - 50; i–) { list.Add(m_Jaco.DiagnosticManager.DataManager.GetPositionFromJaco(i)); }
//Show the time of each positions for (int i = 0; i < (list.Count); i++) { System.Console.WriteLine("time absolute #" + i + " = " + list[i].TimeAbsolute); } } } catch (Exception ex) { System.Console.WriteLine("EXCEPTION"); }
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |
| int Kinova.API.Jaco.Diagnostic.CJacoDiagnosticDataManagerRemote.GetPositionLogCount | ( | CProductJaco | jaco | ) |
Gets a list of all the error from Jaco.
try { CCypherMessage cypherPass;
//MyValidPassword is a string containing the password. cypherPass = Crypto.GetInstance().Encrypt(MyValidPassword); CJacoArm m_Jaco = new CJacoArm(cypherPass);
if (m_Jaco.JacoIsReady()) {
ulong CountError = (ulong)m_Jaco.DiagnosticManager.DataManager.GetErrorLogCount();
if (CountError > 0)
{
//We get a list of position and we take the first element.
CError error = m_Jaco.DiagnosticManager.DataManager.GetErrorsFromJaco()[0];
//We do what need to be done with the list.
//Here, we display the average power consumed by JACO.
System.Console.WriteLine("Code version : " + error.CodeVersion);
}
else
{
System.Console.WriteLine("No error found");
}
} } catch (Exception ex) { System.Console.WriteLine("EXCEPTION"); }
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |
Get the position log count.
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |
| CPosition Kinova.API.Jaco.Diagnostic.CJacoDiagnosticDataManagerRemote.GetPositionLogLiveFromJaco | ( | CProductJaco | jaco | ) |
Gets positions from jaco in a specific range.
| start | The starting index. |
| end | The endding index. |
try { CCypherMessage cypherPass;
//MyValidPassword is a string containing the password. cypherPass = Crypto.GetInstance().Encrypt(MyValidPassword); CJacoArm m_Jaco = new CJacoArm(cypherPass);
if (m_Jaco.JacoIsReady()) { int CountPosition = m_Jaco.DiagnosticManager.DataManager.GetPositionLogCount();
//We get a list of position and we take the first element. CPosition Position = m_Jaco.DiagnosticManager.DataManager.GetPositionsFromJaco(CountPosition - 20, CountPosition - 1)[0];
//We do what need to be done with the list. //Here, we display the average power consumed by JACO.
System.Console.WriteLine("Average power consumed : " + Position.AveragePower); } } catch (Exception ex) { System.Console.WriteLine("EXCEPTION"); }
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |
Gets a real time CPosition from JACO.
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |
| CCaptorsInfo Kinova.API.Jaco.Diagnostic.CJacoDiagnosticDataManagerRemote.GetSensorsInfo | ( | CProductJaco | jaco | ) |
Gets information about Jaco's sensors.
try { CJacoArm m_Jaco = new CJacoArm(Crypto.GetInstance().Encrypt(MyValidPassword));
if (m_Jaco.JacoIsReady()) { //Declaration of the data structure that will hold information about the sensors. float[] info;
//We get the information from the robotic arm Jaco. info = m_Jaco.DiagnosticManager.DataManager.GetSensorsInfo();
System.Console.WriteLine(" Acceleration X : " + info[CJacoDiagnosticDataManager.SENSORSINFO_ACCELERATIONX]); System.Console.WriteLine(" Acceleration Y : " + info[CJacoDiagnosticDataManager.SENSORSINFO_ACCELERATIONY]); System.Console.WriteLine(" Acceleration Z : " + info[CJacoDiagnosticDataManager.SENSORSINFO_ACCELERATIONZ]); System.Console.WriteLine(" Actuator temp 1 : " + info[CJacoDiagnosticDataManager.SENSORSINFO_ACTUATORTEMP1]); System.Console.WriteLine(" Actuator temp 2 : " + info[CJacoDiagnosticDataManager.SENSORSINFO_ACTUATORTEMP2]); System.Console.WriteLine(" Actuator temp 3 : " + info[CJacoDiagnosticDataManager.SENSORSINFO_ACTUATORTEMP3]); System.Console.WriteLine(" Actuator temp 4 : " + info[CJacoDiagnosticDataManager.SENSORSINFO_ACTUATORTEMP4]); System.Console.WriteLine(" Actuator temp 5 : " + info[CJacoDiagnosticDataManager.SENSORSINFO_ACTUATORTEMP5]); System.Console.WriteLine(" Actuator temp 6 : " + info[CJacoDiagnosticDataManager.SENSORSINFO_ACTUATORTEMP6]); System.Console.WriteLine(" Current consumed : " + info[CJacoDiagnosticDataManager.SENSORSINFO_CURRENTCONSUMED]); System.Console.WriteLine(" Finger temp 1 : " + info[CJacoDiagnosticDataManager.SENSORSINFO_FINGERTEMP1]); System.Console.WriteLine(" Finger temp 2 : " + info[CJacoDiagnosticDataManager.SENSORSINFO_FINGERTEMP2]); System.Console.WriteLine(" Finger temp 3 : " + info[CJacoDiagnosticDataManager.SENSORSINFO_FINGERTEMP3]); System.Console.WriteLine(" Supply voltage : " + info[CJacoDiagnosticDataManager.SENSORSINFO_SUPPLYVOLTAGE]); } } catch (Exception ex) { System.Console.WriteLine("EXCEPTION"); }
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |
| double Kinova.API.Jaco.Diagnostic.CJacoDiagnosticDataManagerRemote.RealSpeedTest | ( | CProductJaco | jaco | ) |
Execute a speed test of the USB connection.
| CJACOOfflineException | JACO is offline (USB Connection) |
| CAccessDeniedException | You must enter a valid password when you declare a CJacoArm object. |
| CJacoCommFailedException | Communication has been broken and the system was not able to recover from the fault. |
| CPacketSynchroException | A USB packet has been skip during the communication. |