-
Notifications
You must be signed in to change notification settings - Fork 0
/
StandardFunctions.h
51 lines (44 loc) · 2.04 KB
/
StandardFunctions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Standard functions header file
*
* Declares standard functions for use in Insense
*
* @author jonl
*
*/
#ifndef STANDARD_FUNCTIONS_H_
#define STANDARD_FUNCTIONS_H_
#include "IArray.h"
#include "Bool.h"
#include "AnyType.h"
#include "String.h"
#include <stdint.h>
// General purpose utility functions
uint8_t intToByte_proc(void *this, void *op_status, int i);
unsigned intToUnsigned_proc(void *this, void *op_status, int i);
bool byteArrayEqual_proc(void *this, void *op_status, IArrayPNTR a, IArrayPNTR b);
float avgIntArray_proc(void *this, void *op_status, IArrayPNTR iarray);
float avgRealArray_proc(void *this, void *op_status, IArrayPNTR rarray);
int absInt_proc(void *this, void *op_status, int i);
float absReal_proc(void *this, void *op_status, float r);
int squareInt_proc(void *this, void *op_status, int i);
float squareReal_proc(void *this, void *op_status, float r);
float squareRootInt_proc(void *this, void *op_status, int i);
float squareRoot_proc(void *this, void *op_status, float r);
int realToInt_proc(void *this, void *op_status, float r);
void printString_proc(void *this, void *op_status, StringPNTR s);
void printInt_proc(void *this, void *op_status, int i);
void printReal_proc(void *this, void *op_status, float f);
void printUnsignedInt_proc(void *this, void *op_status, unsigned u);
void printByte_proc(void *this, void *op_status, uint8_t b);
void printTCString_proc(void *this, void *handler, StringPNTR param );
void printTCInt_proc(void *this, void *handler, int param );
void printTCReal_proc(void *this, void *handler, float f );
void printTCUnsignedInt_proc(void *this, void *handler, unsigned param );
void printTCByte_proc(void *this, void *handler, uint8_t param );
StringPNTR getString_proc(void *this, void *handler);
bool stringEquals_proc(void *this, void *handler, StringPNTR param1, StringPNTR param2);
int parseInt_proc(void *this, void *handler, StringPNTR s);
float parseReal_proc(void *this, void *handler, StringPNTR s);
void setCore_proc(void *this, void *handler, unsigned core);
#endif /* STANDARD_FUNCTIONS_H_ */