sigrok-java  unreleased development snapshot
Java bindings for libsigrok
Public Member Functions | List of all members
org.sigrok.core.classes.Context Class Reference

The global libsigrok context. More...

Public Member Functions

java.util.Map< String, Driverdrivers ()
 Available hardware drivers, indexed by name. More...
 
java.util.Map< String, InputFormatinput_formats ()
 Available input formats, indexed by name. More...
 
java.util.Map< String, OutputFormatoutput_formats ()
 Available output formats, indexed by name. More...
 
LogLevel log_level ()
 Current log level. More...
 
void set_log_level (LogLevel level)
 Set the log level. More...
 
void set_log_callback (SWIGTYPE_p_functionT_void_fsigrok__LogLevel_const_p_std__stringF_t callback)
 Set the log callback. More...
 
void set_log_callback_default ()
 Set the log callback to the default handler. More...
 
void set_resource_reader (ResourceReader reader)
 Install a delegate for reading resource files. More...
 
Session create_session ()
 Create a new session. More...
 
UserDevice create_user_device (String vendor, String model, String version)
 Create a new user device. More...
 
Packet create_header_packet (SWIGTYPE_p_Glib__TimeVal start_time)
 Create a header packet. More...
 
Packet create_logic_packet (SWIGTYPE_p_void data_pointer, long data_length, long unit_size)
 Create a logic packet. More...
 
Session load_session (String filename)
 Load a saved session. More...
 
Trigger create_trigger (String name)
 Create a new trigger. More...
 
Input open_file (String filename)
 Open an input file. More...
 
Input open_stream (String header)
 Open an input stream based on header data. More...
 

Detailed Description

The global libsigrok context.

Member Function Documentation

◆ drivers()

java.util.Map<String, Driver> org.sigrok.core.classes.Context.drivers ( )

Available hardware drivers, indexed by name.

◆ input_formats()

java.util.Map<String, InputFormat> org.sigrok.core.classes.Context.input_formats ( )

Available input formats, indexed by name.

◆ output_formats()

java.util.Map<String, OutputFormat> org.sigrok.core.classes.Context.output_formats ( )

Available output formats, indexed by name.

◆ log_level()

LogLevel org.sigrok.core.classes.Context.log_level ( )

Current log level.

◆ set_log_level()

void org.sigrok.core.classes.Context.set_log_level ( LogLevel  level)

Set the log level.

Parameters
levelLogLevel to use.

◆ set_log_callback()

void org.sigrok.core.classes.Context.set_log_callback ( SWIGTYPE_p_functionT_void_fsigrok__LogLevel_const_p_std__stringF_t  callback)

Set the log callback.

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

◆ set_log_callback_default()

void org.sigrok.core.classes.Context.set_log_callback_default ( )

Set the log callback to the default handler.

◆ set_resource_reader()

void org.sigrok.core.classes.Context.set_resource_reader ( ResourceReader  reader)

Install a delegate for reading resource files.

Parameters
readerThe resource reader delegate, or nullptr to unset.

◆ create_session()

Session org.sigrok.core.classes.Context.create_session ( )

Create a new session.

◆ create_user_device()

UserDevice org.sigrok.core.classes.Context.create_user_device ( String  vendor,
String  model,
String  version 
)

Create a new user device.

◆ create_header_packet()

Packet org.sigrok.core.classes.Context.create_header_packet ( SWIGTYPE_p_Glib__TimeVal  start_time)

Create a header packet.

◆ create_logic_packet()

Packet org.sigrok.core.classes.Context.create_logic_packet ( SWIGTYPE_p_void  data_pointer,
long  data_length,
long  unit_size 
)

Create a logic packet.

◆ load_session()

Session org.sigrok.core.classes.Context.load_session ( String  filename)

Load a saved session.

Parameters
filenameFile name string.

◆ create_trigger()

Trigger org.sigrok.core.classes.Context.create_trigger ( String  name)

Create a new trigger.

Parameters
nameName string for new trigger.

◆ open_file()

Input org.sigrok.core.classes.Context.open_file ( String  filename)

Open an input file.

Parameters
filenameFile name string.

◆ open_stream()

Input org.sigrok.core.classes.Context.open_stream ( String  header)

Open an input stream based on header data.

Parameters
headerInitial data from stream.