pysigrok  0.5.2
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 input_format_match (self, filename)
 Lookup the responsible input module for an input file. More...
 
def set_log_callback (self, callback)
 
def set_log_callback_default (self)
 Set the log callback to the default handler. More...
 
def set_resource_reader (self, reader)
 
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 create_end_packet (self)
 Create an end packet. More...
 
def load_session (self, filename)
 
def create_trigger (self, name)
 
def open_file (self, filename)
 
def open_stream (self, header)
 
def serials (self, driver)
 

Static Public Attributes

 create
 
 package_version
 
 lib_version
 
 log_level
 

Properties

 drivers
 
 input_formats
 
 output_formats
 

Detailed Description

The global libsigrok context.

Member Function Documentation

◆ input_format_match()

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

Lookup the responsible input module for an input file.

References sigrok.core.classes.Context.set_log_callback(), and sigrok.core.classes.Context.set_log_callback_default().

+ Here is the call graph for this function:

◆ set_log_callback()

def sigrok.core.classes.Context.set_log_callback (   self,
  callback 
)
     Set the log callback.
     @param callback Callback of the form callback(LogLevel, string).

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

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

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

◆ set_log_callback_default()

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().

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

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

◆ set_resource_reader()

def sigrok.core.classes.Context.set_resource_reader (   self,
  reader 
)
     Install a delegate for reading resource files.
     @param reader The 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:

◆ create_session()

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:

◆ create_user_device()

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:

◆ create_header_packet()

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

Create a header packet.

References sigrok.core.classes.Context.create_analog_packet(), and sigrok.core.classes.Context.create_end_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:

◆ create_meta_packet()

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:

◆ create_logic_packet()

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

Create a logic packet.

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

+ Here is the caller graph for this function:

◆ create_analog_packet()

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.create_trigger().

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:

◆ create_end_packet()

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

Create an end 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:

◆ load_session()

def sigrok.core.classes.Context.load_session (   self,
  filename 
)
     Load a saved session.
     @param filename File 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:

◆ create_trigger()

def sigrok.core.classes.Context.create_trigger (   self,
  name 
)
     Create a new trigger.
     @param name Name string for new trigger.

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

+ Here is the caller graph for this function:

◆ open_file()

def sigrok.core.classes.Context.open_file (   self,
  filename 
)
     Open an input file.
     @param filename File name string.

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

+ Here is the caller graph for this function:

◆ open_stream()

def sigrok.core.classes.Context.open_stream (   self,
  header 
)
     Open an input stream based on header data.
     @param header Initial 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: