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
-
.all ⇒ nil
This method will return an array of Phidget objects.
-
.disable_logging! ⇒ nil
This method will disable logging within the Phidget library, if logging was previously enabled.
-
.enable_logging!(log_level, file_path = nil) ⇒ nil
This method will enable logging within the Phidget library.
-
.log(log_level, message) ⇒ nil
Logs an event of type log_level to the Phidget log, citing the provided message.
Class Method Details
.all ⇒ nil
This method will return an array of Phidget objects. These objects all the represent all the Phidgets which are currently connected to your computer.
.disable_logging! ⇒ nil
This method will disable logging within the Phidget library, if logging was previously enabled.
.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.
.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.