RTP Series API Programming Reference
1.2.1
|
Functions | |
EXPORT int | PwrSnsr_FindResources (const char *Delimiter, int ValBufferSize, char Val[]) |
Returns a delimited string of available resources. These strings can be used in the initialize function to open a session to an instrument. More... | |
EXPORT int | PwrSnsr_GetMinimumSupportedFirmware (int *Version) |
Gets the minimum supported firmware as an integer. Format is YYYYMMDD. More... | |
EXPORT int | PwrSnsr_SetTimeOut (SessionID Vi, long Milliseconds) |
Sets the time out in milliseconds for I/O. More... | |
EXPORT int | PwrSnsr_GetTimeOut (SessionID Vi, long *Val) |
Returns the time out value for I/O in milliseconds. More... | |
EXPORT int | PwrSnsr_init (char *ResourceName, SessionID *Vi) |
Initialize a communication session with a supported USB power sensor. More... | |
EXPORT int | PwrSnsr_close (SessionID Vi) |
Closes the I/O session to the instrument. Driver methods and properties that access the instrument are not accessible after Close is called. More... | |
EXPORT int | PwrSnsr_GetError (SessionID Vi, int *ErrorCode, int ErrorDescriptionBufferSize, char ErrorDescription[]) |
This function retrieves and then clears the error information for the session. Normally, the error information describes the first error that occurred since the user last called the Get Error or Clear Error function. More... | |
EXPORT int | PwrSnsr_ClearError (SessionID Vi) |
This function clears the error code and error description for the given session. More... | |
EXPORT int | PwrSnsr_reset (SessionID Vi) |
EXPORT int | PwrSnsr_self_test (SessionID Vi, int *TestResult) |
Performs an instrument self test, waits for the instrument to complete the test, and queries the instrument for the results. If the instrument passes the test, TestResult is 0. More... | |
EXPORT int | PwrSnsr_SetFetchLatency (SessionID Vi, int Latency) |
Set the period the library waits to update fetch measurements in ms. More... | |
EXPORT int | PwrSnsr_GetFetchLatency (SessionID Vi, int *Latency) |
Get the period the library waits to update fetch measurements in ms. More... | |
Session management functions
This function clears the error code and error description for the given session.
Vi | The SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session. |
Closes the I/O session to the instrument. Driver methods and properties that access the instrument are not accessible after Close is called.
Vi | The SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session. |
EXPORT int PwrSnsr_FindResources | ( | const char * | Delimiter, |
int | ValBufferSize, | ||
char | Val[] | ||
) |
Returns a delimited string of available resources. These strings can be used in the initialize function to open a session to an instrument.
Delimiter | The string used to delimit the list of resources ie. "|", " ", ";", etc. |
ValBufferSize | Number of elements in Val. |
Val | The return string. |
EXPORT int PwrSnsr_GetError | ( | SessionID | Vi, |
int * | ErrorCode, | ||
int | ErrorDescriptionBufferSize, | ||
char | ErrorDescription[] | ||
) |
This function retrieves and then clears the error information for the session. Normally, the error information describes the first error that occurred since the user last called the Get Error or Clear Error function.
Vi | The SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session. |
ErrorCode | |
ErrorDescriptionBufferSize | |
ErrorDescription |
Get the period the library waits to update fetch measurements in ms.
Vi | The SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session. |
Latency | Fetch latency in ms. |
EXPORT int PwrSnsr_GetMinimumSupportedFirmware | ( | int * | Version | ) |
Gets the minimum supported firmware as an integer. Format is YYYYMMDD.
Returns the time out value for I/O in milliseconds.
Vi | The SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session. |
Val | Time out in milliseconds. -1 denotes infinite time out. |
Initialize a communication session with a supported USB power sensor.
ResourceName | Name of the resource. The resource descriptor is in the following format: USB::[VID]::[PID]::[Serial Number]::SNSR Where serial number is the USB power meter’s serial number in decimal format, and the VID and PID are in hexidecimal format. e.g. For serial number 1234, VID of 0x1bfe and PID of 0x5500: USB::0x1BFE::0x5500::1234::SNSR Multiple channel synthetic meters can be defined by combining more than one descriptor separated by a semicolon. Channel assignment is determined by the order in the list, in other words CH1 would be the first listed resource, CH2 the second resource, etc. e.g. Define a synthetic peak power meter using serial number 1234 for CH1 and serial number 4242 for CH2: USB::0x1BFE::0x5500::1234::SNSR;USB::0x1BFE::0x5500::4242::SNSR |
Vi | The SessionID handle |
Places the instrument in a known state.
Vi | The SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session. |
Performs an instrument self test, waits for the instrument to complete the test, and queries the instrument for the results. If the instrument passes the test, TestResult is 0.
Vi | The SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session. |
TestResult | Error or success code. |
Set the period the library waits to update fetch measurements in ms.
Vi | The SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session. |
Latency | Fetch latency in ms. |
Sets the time out in milliseconds for I/O.
Vi | The SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session. |
Milliseconds | Time out in milliseconds. Use -1 for infinite time out. |