Defines | Functions | Variables
blink1_node.cpp File Reference
#include <ros/ros.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <time.h>
#include "blink1/hiddata.h"
#include "blink1/Blink.h"
#include "blink1/blinkfn.h"
Include dependency graph for blink1_node.cpp:

Go to the source code of this file.

Defines

#define IDENT_PRODUCT_NUM   0x01ED
#define IDENT_PRODUCT_STRING   "blink(1)"
#define IDENT_VENDOR_NUM   0x27B8
#define IDENT_VENDOR_STRING   "ThingM"

Functions

void blink1_close (usbDevice_t *dev)
char * blink1_error_msg (int errCode)
int blink1_fadeToRGB (usbDevice_t *dev, int fadeMillis, uint8_t r, uint8_t g, uint8_t b)
int blink1_open (usbDevice_t **dev)
int blink1_setRGB (usbDevice_t *dev, uint8_t r, uint8_t g, uint8_t b)
bool blinkCB (blink1::Blink::Request &req, blink1::Blink::Response &res)
static int hexread (char *buffer, char *string, int buflen)
int main (int argc, char **argv)
void SigintHandler (int sig)

Variables

bool blink_control
usbDevice_tdev
bool exit_
blink1::Blink::Request last_request

Define Documentation

#define IDENT_PRODUCT_NUM   0x01ED

Definition at line 43 of file blink1_node.cpp.

#define IDENT_PRODUCT_STRING   "blink(1)"

Definition at line 45 of file blink1_node.cpp.

#define IDENT_VENDOR_NUM   0x27B8

Definition at line 42 of file blink1_node.cpp.

#define IDENT_VENDOR_STRING   "ThingM"

Definition at line 44 of file blink1_node.cpp.


Function Documentation

void blink1_close ( usbDevice_t dev)

Close a Blink1

Definition at line 155 of file blink1_node.cpp.

char * blink1_error_msg ( int  errCode)

Definition at line 217 of file blink1_node.cpp.

int blink1_fadeToRGB ( usbDevice_t dev,
int  fadeMillis,
uint8_t  r,
uint8_t  g,
uint8_t  b 
)

Definition at line 163 of file blink1_node.cpp.

int blink1_open ( usbDevice_t **  dev)

Open up a blink(1) for transactions. returns 0 on success, and opened device in "dev" or returns non-zero error that can be decoded with blink1_error_msg() FIXME: what happens when multiple are plugged in?

Definition at line 144 of file blink1_node.cpp.

int blink1_setRGB ( usbDevice_t dev,
uint8_t  r,
uint8_t  g,
uint8_t  b 
)

Definition at line 194 of file blink1_node.cpp.

bool blinkCB ( blink1::Blink::Request &  req,
blink1::Blink::Response &  res 
)

Definition at line 70 of file blink1_node.cpp.

static int hexread ( char *  buffer,
char *  string,
int  buflen 
) [static]

Definition at line 233 of file blink1_node.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 97 of file blink1_node.cpp.

void SigintHandler ( int  sig)

Definition at line 60 of file blink1_node.cpp.


Variable Documentation

Definition at line 48 of file blink1_node.cpp.

Definition at line 47 of file blink1_node.cpp.

bool exit_

Definition at line 49 of file blink1_node.cpp.

blink1::Blink::Request last_request

Definition at line 50 of file blink1_node.cpp.



blink1
Author(s): Guilherme Pereira (The AIR lab, Carnegie Mellon University)
autogenerated on Sat Jun 8 2019 20:13:43