pysigrok  unreleased development snapshot
Python bindings for libsigrok
Public Member Functions | Static Public Attributes | Properties | List of all members
classes.Context Class Reference

The global libsigrok context. More...

Inherits classes._object.

Public Member Functions

def set_log_callback (self, callback)
 Set the log callback. More...
 
def set_log_callback_default (self)
 Set the log callback to the default handler. More...
 
def set_resource_reader (self, reader)
 Install a delegate for reading resource files. More...
 
def create_session (self)
 Create a new session. More...
 
def create_user_device (self, vendor, model, version)
 Create a new user device. More...
 
def create_header_packet (self, start_time)
 Create a header packet. More...
 
def create_meta_packet (self, config)
 Create a meta packet. More...
 
def create_logic_packet (self, data_pointer, data_length, unit_size)
 Create a logic packet. More...
 
def create_analog_packet (self, channels, data_pointer, num_samples, mq, unit, mqflags)
 Create an analog packet. More...
 
def load_session (self, filename)
 Load a saved session. More...
 
def create_trigger (self, name)
 Create a new trigger. More...
 
def open_file (self, filename)
 Open an input file. More...
 
def open_stream (self, header)
 Open an input stream based on header data. More...
 
def serials (self, driver)
 

Static Public Attributes

 create
 
 package_version
 
 lib_version
 

Properties

 drivers
 
 input_formats
 
 output_formats
 

Detailed Description

The global libsigrok context.

Member Function Documentation

◆ set_log_callback()

def classes.Context.set_log_callback (   self,
  callback 
)

Set the log callback.

Parameters
callbackCallback of the form callback(LogLevel, string).

References classes.Context.set_resource_reader().

+ Here is the call graph for this function:

◆ set_log_callback_default()

def classes.Context.set_log_callback_default (   self)

Set the log callback to the default handler.

References classes.Context.create_session(), and classes.Context.create_user_device().

+ Here is the call graph for this function:

◆ set_resource_reader()

def classes.Context.set_resource_reader (   self,
  reader 
)

Install a delegate for reading resource files.

Parameters
readerThe resource reader delegate, or nullptr to unset.

References classes.Context.create_header_packet().

Referenced by classes.Context.set_log_callback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_session()

def classes.Context.create_session (   self)

Create a new session.

References classes.Context.create_meta_packet().

Referenced by classes.Context.set_log_callback_default().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_user_device()

def classes.Context.create_user_device (   self,
  vendor,
  model,
  version 
)

Create a new user device.

References classes.Context.create_logic_packet().

Referenced by classes.Context.set_log_callback_default().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_header_packet()

def classes.Context.create_header_packet (   self,
  start_time 
)

Create a header packet.

References classes.Context.create_analog_packet().

Referenced by classes.Context.set_resource_reader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_meta_packet()

def classes.Context.create_meta_packet (   self,
  config 
)

Create a meta packet.

References classes.Context.load_session().

Referenced by classes.Context.create_session().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_logic_packet()

def classes.Context.create_logic_packet (   self,
  data_pointer,
  data_length,
  unit_size 
)

Create a logic packet.

References classes.Context.create_trigger().

Referenced by classes.Context.create_user_device().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_analog_packet()

def classes.Context.create_analog_packet (   self,
  channels,
  data_pointer,
  num_samples,
  mq,
  unit,
  mqflags 
)

Create an analog packet.

References classes.Context.open_file().

Referenced by classes.Context.create_header_packet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_session()

def classes.Context.load_session (   self,
  filename 
)

Load a saved session.

Parameters
filenameFile name string.

References classes.Context.open_stream().

Referenced by classes.Context.create_meta_packet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_trigger()

def classes.Context.create_trigger (   self,
  name 
)

Create a new trigger.

Parameters
nameName string for new trigger.

Referenced by classes.Context.create_logic_packet().

+ Here is the caller graph for this function:

◆ open_file()

def classes.Context.open_file (   self,
  filename 
)

Open an input file.

Parameters
filenameFile name string.

Referenced by classes.Context.create_analog_packet().

+ Here is the caller graph for this function:

◆ open_stream()

def classes.Context.open_stream (   self,
  header 
)

Open an input stream based on header data.

Parameters
headerInitial data from stream.

Referenced by classes.Context.load_session().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: