pysigrok  0.4.0
Python bindings for libsigrok
Public Member Functions | Static Public Attributes | Properties | List of all members
sigrok.core.classes.Context Class Reference

The global libsigrok context. More...

Inherits sigrok.core.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

tuple create
 
tuple package_version
 
tuple lib_version
 

Properties

 drivers
 
 input_formats
 
 output_formats
 

Detailed Description

The global libsigrok context.

Member Function Documentation

def sigrok.core.classes.Context.set_log_callback (   self,
  callback 
)

Set the log callback.

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

References sigrok.core.classes.Context.set_resource_reader().

+ Here is the call graph for this function:

def sigrok.core.classes.Context.set_log_callback_default (   self)

Set the log callback to the default handler.

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

+ Here is the call graph for this function:

def sigrok.core.classes.Context.set_resource_reader (   self,
  reader 
)

Install a delegate for reading resource files.

Parameters
readerThe resource reader delegate, or nullptr to unset.

References sigrok.core.classes.Context.create_header_packet().

Referenced by sigrok.core.classes.Context.set_log_callback().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def sigrok.core.classes.Context.create_session (   self)

Create a new session.

References sigrok.core.classes.Context.create_meta_packet().

Referenced by sigrok.core.classes.Context.set_log_callback_default().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Create a new user device.

References sigrok.core.classes.Context.create_logic_packet().

Referenced by sigrok.core.classes.Context.set_log_callback_default().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def sigrok.core.classes.Context.create_header_packet (   self,
  start_time 
)

Create a header packet.

References sigrok.core.classes.Context.create_analog_packet().

Referenced by sigrok.core.classes.Context.set_resource_reader().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def sigrok.core.classes.Context.create_meta_packet (   self,
  config 
)

Create a meta packet.

References sigrok.core.classes.Context.load_session().

Referenced by sigrok.core.classes.Context.create_session().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Create a logic packet.

References sigrok.core.classes.Context.create_trigger().

Referenced by sigrok.core.classes.Context.create_user_device().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Create an analog packet.

References sigrok.core.classes.Context.open_file().

Referenced by sigrok.core.classes.Context.create_header_packet().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def sigrok.core.classes.Context.load_session (   self,
  filename 
)

Load a saved session.

Parameters
filenameFile name string.

References sigrok.core.classes.Context.open_stream().

Referenced by sigrok.core.classes.Context.create_meta_packet().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def sigrok.core.classes.Context.create_trigger (   self,
  name 
)

Create a new trigger.

Parameters
nameName string for new trigger.

Referenced by sigrok.core.classes.Context.create_logic_packet().

+ Here is the caller graph for this function:

def sigrok.core.classes.Context.open_file (   self,
  filename 
)

Open an input file.

Parameters
filenameFile name string.

Referenced by sigrok.core.classes.Context.create_analog_packet().

+ Here is the caller graph for this function:

def sigrok.core.classes.Context.open_stream (   self,
  header 
)

Open an input stream based on header data.

Parameters
headerInitial data from stream.

Referenced by sigrok.core.classes.Context.load_session().

+ Here is the caller graph for this function:


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