Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
#include <assert.h>
#include <pthread.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "ca821x-posix/ca821x-posix-evbme.h"
#include "ca821x-posix/ca821x-posix.h"
#include "evbme_messages.h"
Classes | |
struct | M_KeyDescriptor_st |
struct | inst_priv |
Macros | |
#define | RED "\x1b[31m" |
#define | GREEN "\x1b[32m" |
#define | YELLOW "\x1b[33m" |
#define | BLUE "\x1b[34m" |
#define | MAGENTA "\x1b[35m" |
#define | CYAN "\x1b[36m" |
#define | BOLDWHITE "\033[1m\033[37m" |
#define | RESET "\x1b[0m" |
#define | COLOR_SET(C, X) C X RESET |
#define | M_PANID 0x5ECC |
#define | M_MSDU_LENGTH 100 |
#define | MAX_INSTANCES 5 |
#define | TX_PERIOD ((struct timespec){0, 0}) |
#define | CHANNEL 22 |
#define | SWAP_COUNTDOWN 100 |
#define | NEW_MODE 0 |
Functions | |
void | initInst (struct inst_priv *cur) |
void | drawTableHeader () |
void | drawTableRow (unsigned int time) |
int | main (int argc, char *argv[]) |
Variables | |
uint8_t | key1 [] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff} |
uint8_t | key2 [] = {0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00} |
uint8_t | addr1 [] = {0xBE, 0xEF, 0xEA, 0x7E, 0x50, 0x57, 0xEA, 0x35} |
uint8_t | addr2 [] = {0xFA, 0xCE, 0x0F, 0xFF, 0xFA, 0xCE, 0x17, 0x00} |
uint16_t | saddr1 = 0xBEEF |
uint16_t | saddr2 = 0xFACE |
int | numInsts |
struct inst_priv | insts [MAX_INSTANCES] = {} |
pthread_mutex_t | out_mutex = PTHREAD_MUTEX_INITIALIZER |
#define BLUE "\x1b[34m" |
#define BOLDWHITE "\033[1m\033[37m" |
#define CHANNEL 22 |
#define COLOR_SET | ( | C, | |
X | |||
) | C X RESET |
#define CYAN "\x1b[36m" |
#define GREEN "\x1b[32m" |
#define M_MSDU_LENGTH 100 |
#define M_PANID 0x5ECC |
#define MAGENTA "\x1b[35m" |
#define MAX_INSTANCES 5 |
#define NEW_MODE 0 |
#define RED "\x1b[31m" |
#define RESET "\x1b[0m" |
#define SWAP_COUNTDOWN 100 |
#define TX_PERIOD ((struct timespec){0, 0}) |
#define YELLOW "\x1b[33m" |
void drawTableHeader | ( | ) |
void drawTableRow | ( | unsigned int | time | ) |
void initInst | ( | struct inst_priv * | cur | ) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
uint8_t addr1[] = {0xBE, 0xEF, 0xEA, 0x7E, 0x50, 0x57, 0xEA, 0x35} |
uint8_t addr2[] = {0xFA, 0xCE, 0x0F, 0xFF, 0xFA, 0xCE, 0x17, 0x00} |
struct inst_priv insts[MAX_INSTANCES] = {} |
uint8_t key1[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff} |
uint8_t key2[] = {0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00} |
int numInsts |
pthread_mutex_t out_mutex = PTHREAD_MUTEX_INITIALIZER |
uint16_t saddr1 = 0xBEEF |
uint16_t saddr2 = 0xFACE |