Blink1Device

Undocumented in source.

Members

Enums

LED
enum LED
Undocumented in source.

Functions

close
void close()

Closes this device.

disableServerDown
void disableServerDown()

Disables the serverDown mode. See enableServerDown.

enableServerDown
void enableServerDown(Duration timeout, bool stayLit, ubyte startPosition, ubyte endPosition)

Enables the blink1's dead man's trigger. This will play the pattern on the LED when pokeServerDown hasn't been called after timeout has been passed.

fadeToRGB
void fadeToRGB(ubyte r, ubyte g, ubyte b, Duration dur, LED led)

Fades the color to the specified value with the given duration.

getFwVersion
string getFwVersion()
Undocumented in source. Be warned that the author may not have intended to support it.
getFwVersionInt
int getFwVersionInt()

Returns the firmware version integer. The hundreds represent the major version, while the units and tenths represent the minor version, e.g. "v3.3" = 303;

pokeServerDown
void pokeServerDown()

Notifies the LED the "server" is still running, so it won't turn on. See enableServerDown.

readNote
ubyte[] readNote(ubyte id)
Undocumented in source. Be warned that the author may not have intended to support it.
setRGB
void setRGB(ubyte r, ubyte g, ubyte b)

Immediatelty changes the color to the given value

writeNote
void writeNote(ubyte id, ubyte[] note)

Properties

blocking
bool blocking [@property setter]

Enables/disables blocking mode

blocking
bool blocking [@property getter]

Returns if blocking mode is enabled. See blocking(bool) above as well.

defaultDuration
Duration defaultDuration [@property setter]

Sets the default duration for fade animations if no duration parameter is given.

defaultDuration
Duration defaultDuration [@property getter]

Gets the default duration for fade animations if no duration parameter is given.

type
Blink1Type type [@property getter]

Gets the device type of this device.

Static functions

open
Blink1Device open()

Opens the first found default Blink1Device. No guarantees are given which one is found first. Throws a Blink1NotFoundException if no device could be found.

openByIndex
Blink1Device openByIndex(uint index)

Opens the device by the given index. The index should range from 0 to blink1_max_devices. Throws a Blink1NotFoundException if no device could be found with the given index;

openByPath
Blink1Device openByPath(string path)

Opens the device by the OS-specific path. Throws a Blink1NotFoundException if no device could be found with the given path.

openBySerial
Blink1Device openBySerial(string serial)

Opens the device by the given serial number. Throws a Blink1NotFoundException if no device could be found with the given serial number.

Static variables

MAX_NOTES
auto MAX_NOTES;
Undocumented in source.
MAX_NOTE_SIZE
auto MAX_NOTE_SIZE;
Undocumented in source.

Variables

m_blocking
bool m_blocking;
Undocumented in source.
m_cachedIndex
int m_cachedIndex;
Undocumented in source.
m_defaultDur
Duration m_defaultDur;
Undocumented in source.
m_device
blink1_device* m_device;
Undocumented in source.
m_maxPatterns
ubyte m_maxPatterns;
Undocumented in source.
m_type
Blink1Type m_type;
Undocumented in source.

Meta