sigrok-java  0.4.0
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

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

Available hardware drivers, indexed by name.

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

Available input formats, indexed by name.

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

Available output formats, indexed by name.

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

Current log level.

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

Set the log level.

levelLogLevel to use.
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.

callbackCallback of the form callback(LogLevel, string).
void org.sigrok.core.classes.Context.set_log_callback_default ( )

Set the log callback to the default handler.

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

Install a delegate for reading resource files.

readerThe resource reader delegate, or nullptr to unset.
Session org.sigrok.core.classes.Context.create_session ( )

Create a new session.

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

Create a new user device.

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

Create a header 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.

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

Load a saved session.

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

Create a new trigger.

nameName string for new trigger.
Input org.sigrok.core.classes.Context.open_file ( String  filename)

Open an input file.

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

Open an input stream based on header data.

headerInitial data from stream.