![]() |
Python API
|
Base class for PLUX signal-acquiring devices with internal memory. More...
Public Member Functions | |
def | __init__ |
Promotes a BaseDev instance to MemoryDev. More... | |
def | setTime |
Sets the device real-time clock. More... | |
def | getTime |
Returns the device current real-time clock as a datetime.datetime object. More... | |
def | getSchedules |
Returns all session schedules stored on the device. More... | |
def | addSchedule |
Adds a session schedule to the device. More... | |
def | deleteSchedule |
Deletes a session schedule from the device. More... | |
def | deleteAllSchedules |
Deletes all session schedules from the device. More... | |
def | stopSessionAcq |
Stops an internal acquisition session. More... | |
def | getSessions |
Returns the headers of all sessions stored on the device. More... | |
def | replaySession |
Replays a session stored on the device. More... | |
def | deleteAllSessions |
Deletes all sessions stored on the device. More... | |
def | getMemoryUsed |
Returns the amount of memory used by all sessions stored on the device in kBytes. More... | |
def | onSessionRawFrame |
Raw frames callback for stored sessions replay. More... | |
def | onSessionEvent |
Event callback for stored sessions replay. More... | |
![]() | |
def | __init__ |
Promotes a BaseDev instance to SignalsDev. More... | |
def | start |
Starts a real-time acquisition session. More... | |
def | start |
Starts a real-time acquisition session. More... | |
def | stop |
Stops a real-time acquisition session. More... | |
def | setDOut |
Sets the digital output state. More... | |
def | onRawFrame |
Raw frames callback. More... | |
![]() | |
def | __init__ |
Connects to a PLUX device. More... | |
def | getProperties |
Returns the device properties. More... | |
def | getBattery |
Returns a float number with the remaining battery charge as a percentage of full capacity. More... | |
def | setTimeout |
Sets the receiving timeout value for loop(). More... | |
def | loop |
Runs the device message loop. More... | |
def | interrupt |
Sends an interrupt signal to loop(). More... | |
def | onEvent |
Event callback. More... | |
def | onTimeout |
Timeout callback. More... | |
def | onInterrupt |
Interrupt signal callback. More... | |
def | close |
Disconnects from the device. More... | |
Additional Inherited Members | |
![]() | |
def | findDevices |
Finds PLUX devices within the given domain. More... | |
Base class for PLUX signal-acquiring devices with internal memory.
def plux.MemoryDev.__init__ | ( | self, | |
baseDev | |||
) |
def plux.MemoryDev.addSchedule | ( | self, | |
sch | |||
) |
Adds a session schedule to the device.
An internal acquisition session (i.e., an acquisition to internal memory) will start when the schedule start time or condition is met.
sch | The schedule do add as a Schedule object. |
def plux.MemoryDev.deleteAllSchedules | ( | self | ) |
Deletes all session schedules from the device.
def plux.MemoryDev.deleteAllSessions | ( | self | ) |
Deletes all sessions stored on the device.
def plux.MemoryDev.deleteSchedule | ( | self, | |
startTime | |||
) |
Deletes a session schedule from the device.
startTime | The Schedule.startTime attribute value of the schedule to delete. |
def plux.MemoryDev.getMemoryUsed | ( | self | ) |
Returns the amount of memory used by all sessions stored on the device in kBytes.
memorySize
property in getProperties(). def plux.MemoryDev.getSchedules | ( | self | ) |
Returns all session schedules stored on the device.
The returned schedules can refer to a running session (a running schedule, at most one such schedule) or to a session to run in the future. The schedules were previously added by calling addSchedule() or start().
def plux.MemoryDev.getSessions | ( | self | ) |
Returns the headers of all sessions stored on the device.
def plux.MemoryDev.getTime | ( | self | ) |
Returns the device current real-time clock as a datetime.datetime
object.
def plux.MemoryDev.onSessionEvent | ( | self, | |
event | |||
) |
Event callback for stored sessions replay.
This callback is called by replaySession() for every event to be replayed from the stored session. In order to receive device events, an application must derive MemoryDev class (or any of its derived classes) to a new class and override this method in the new class.
event | The replayed event. It can be a DigInUpdate or Sync object. |
def plux.MemoryDev.onSessionRawFrame | ( | self, | |
nSeq, | |||
data | |||
) |
Raw frames callback for stored sessions replay.
This callback is called by replaySession() for every frame to be replayed from the stored session. In order to receive data frames, an application must derive MemoryDev class (or any of its derived classes) to a new class and override this method in the new class.
This callback parameters are equivalent to onRawFrame() callback parameters.
def plux.MemoryDev.replaySession | ( | self, | |
startTime, | |||
iniFrame = 0 |
|||
) |
Replays a session stored on the device.
While a session is being replayed, this method runs a message loop which replaces loop(). The message loop receives and dispatches real-time messages and stored session data to the callbacks. When a callback returns True, the session replay ends and this method returns. The method returns if the end of stored session was reached.
startTime | The Session.startTime attribute value (as returned by getSessions()) of the session to replay. |
iniFrame | An optional integer with the frame sequence number from which the session starts to be replayed. |
def plux.MemoryDev.setTime | ( | self, | |
time = None |
|||
) |
Sets the device real-time clock.
time | An optional datetime.datetime object with the time to set on device. If this parameter is not given, current host time is used. |
def plux.MemoryDev.stopSessionAcq | ( | self | ) |
Stops an internal acquisition session.