Module: PhidgetsNative

Defined in:
ext/phidgets_native/phidgets_native_ruby.c

Defined Under Namespace

Classes: Accelerometer, AdvancedServo, Analog, BadPasswordError, BadVersionError, Bridge, ClosedError, Device, DuplicateError, Encoder, EventError, GPS, IR, InterfaceKit, InterruptedError, InvalidArgError, InvalidError, LED, MotorControl, NetworkError, NetworkNotConnectedError, NoMemoryError, NotAttachedError, NotFoundError, OutOfBoundsError, PHSensor, RFID, Servo, Spatial, Stepper, TextLCD, TextLED, TimeoutError, UnexpectedError, UnhandledError, UnknownValError, UnsupportedError, WeightSensor, WrongDeviceError

Constant Summary collapse

LIBRARY_VERSION =

This constant is a string which reflects the version of the phidget library being used.

rb_str_new2(phidget_library_version)

Class Method Summary collapse

Class Method Details

.allnil

This method will return an array of Phidget objects. These objects all the represent all the Phidgets which are currently connected to your computer.

Returns:

  • (nil)

.disable_logging!nil

This method will disable logging within the Phidget library, if logging was previously enabled.

Returns:

  • (nil)

.enable_logging!(log_level, file_path = nil) ⇒ nil

This method will enable logging within the Phidget library. The log_level parameter indicates the highest degree of desired output verbosity. Logged data will be that which is less than or equal to this level. Currently, the supported verbosity levels, in ascending order of verbosity are as follows:

  • :critical

  • :error

  • :warning

  • :debug

  • :info

  • :verbose

Be sure to specify a symbol, and not a string.

The optional file_path parameter can be used to divert logging output to a file, instead of the default behavior of logging to stdout. Be advised that only absolute path names appear to be supported by the library at this time.

Returns:

  • (nil)

.log(log_level, message) ⇒ nil

Logs an event of type log_level to the Phidget log, citing the provided message. Supported log_levels are declared in the enable_logging! method.

Returns:

  • (nil)