picofuse-objc

Instance Methods | List of all members
BME680Sensor Class Reference

A Bosch BME680 on an I2C bus, as an event source of the application, which is read every interval, and sends a target an NXSensorEvent for each quantity it measures: @"temp" (@"C"), @"pressure" (@"Pa"), @"humidity" (@"%") and, when its gas heater's reading is valid, @"gas" (@"ohm"). More...

#import <Devices/Devices.h>

Inheritance diagram for BME680Sensor:
Inheritance graph
[legend]
Collaboration diagram for BME680Sensor:
Collaboration graph
[legend]

Instance Methods

(BOOL) - setTarget:selector:
 Sets what its readings are sent to, or nil for nowhere. More...
 
(uint8_t) - address
 Returns its I2C address.
 
- Instance Methods inherited from NXObject
(void) - dealloc
 Frees the instance. More...
 
(NXZone *) - zone
 Returns the zone in which the instance was allocated. More...
 
(id) - retain
 Increases the retain count of the receiver. More...
 
(void) - release
 Decreases the retain count of the receiver. More...
 
(id) - autorelease
 Releases the receiver later, when the current autorelease pool of the thread is drained. More...
 
(id) - copy
 Returns a copy which can't be changed by anything else, which the caller owns and has to release. More...
 
(uintptr_t) - hash
 Returns a number for the object, which is the same for objects which are equal by isEqual:. More...
 
(NXString *) - description
 Returns a string which describes the instance, for logging. More...
 
- Instance Methods inherited from Object
(id) - init
 Initialize the instance, after allocation. More...
 
(Class) - class
 Returns the class of the instance. More...
 
(Class) - superclass
 Returns the superclass of the instance. More...
 
(BOOL) - isEqual:
 Compares the receiver to another object for equality. More...
 
(BOOL) - isKindOfClass:
 Returns a Boolean value that indicates whether the receiver is an instance of a given class. More...
 
(BOOL) - conformsTo:
 Checks if the receiver's class conforms to a protocol. More...
 
- Instance Methods inherited from <ObjectProtocol>
(BOOL) - respondsToSelector:
 Checks if the receiver responds to a selector. More...
 

Additional Inherited Members

- Class Methods inherited from NXObject
(id) + alloc
 Allocates a new instance in the default zone, or if there isn't one, with sys_calloc(). More...
 
(id) + allocWithZone:
 Allocates a new instance in a specific zone. More...
 
(id) + new
 Allocates and initializes a new instance, as [[cls alloc] init] does. More...
 
(NXString *) + description
 Returns the name of the class.
 
- Class Methods inherited from Object
(void) + initialize
 Performs one-time initialization for the class. More...
 
(Class) + class
 Returns the class object. More...
 
(Class) + superclass
 Returns the superclass of the class. More...
 
(const char *) + name
 Returns the name of the class. More...
 
(BOOL) + conformsTo:
 Checks if the class conforms to a protocol. More...
 
- Protected Attributes inherited from Object
Class isa
 A pointer to the object's class structure. More...
 

Detailed Description

A Bosch BME680 on an I2C bus, as an event source of the application, which is read every interval, and sends a target an NXSensorEvent for each quantity it measures: @"temp" (@"C"), @"pressure" (@"Pa"), @"humidity" (@"%") and, when its gas heater's reading is valid, @"gas" (@"ohm").

NXDeviceManager makes one from its description, by the name of its key, such as "indoor": { "@class": "BME680Sensor" }, with "bus", on Linux, its I2C adapter, which is /dev/i2c-1, on a Raspberry Pi's header, without it, or else on a Pico the board's own bus, "address", its I2C address, which is 118 (0x76) or 119 (0x77), or else whichever it's found at, and "interval", how often it's read, in milliseconds, which is 5000 without it. Each sensor is a key of its own, with an address of its own. One which isn't found isn't made, which the manager logs.

A reading's started on one of HID's polls and fetched on a later one, so nothing waits for the sensor.

Definition at line 29 of file BME680Sensor.h.

Method Documentation

◆ setTarget:selector:()

- (BOOL) setTarget: (id)  target
selector: (SEL)  selector 

Sets what its readings are sent to, or nil for nowhere.

Parameters
targetWhat the message is sent to, which is retained, or nil.
selectorA method of the target which has an NXInputEvent as its one argument, such as -input:.
Returns
YES, or NO if the selector isn't a method of the target which takes one object.

The documentation for this class was generated from the following file: