i would like to use a library arduino on B4R, and i have som issues
original library is :
first, i have issue with this line : static void getRaw(unsigned int **timings, unsigned int* timings_size);
what to do with **timings?
after, at xml creation, we have to define property / method
normally property should be a simple method with return and without parameter (like a get) or with a parameter but without return (like set) but from B4Rh2xml.jar run, it is not working in this way... What is the good way ?
and what is impact of static parameter in h file ? can we ignore it for wrapper?
and when we have uint getPulseLengthDivider(); in wrapper h file, in xml i have <name>PulseLengthDivider</name>
"get" is removed, is it normal and why ?
original library and first work on a wrapper are in zip attached, but i am stuck with unsigned int **timings : i didn't see similar examples of wrapper...
thanks for your help
original library is :
B4X:
/*
RFControl.h -
*/
#ifndef ArduinoRf_h
#define ArduinoRf_h
class RFControl
{
public:
static unsigned int getPulseLengthDivider();
static void startReceiving(int interruptPin);
static void stopReceiving();
static bool hasData();
static void getRaw(unsigned int **timings, unsigned int* timings_size);
static void continueReceiving();
static bool compressTimings(unsigned int buckets[8], unsigned int *timings, unsigned int timings_size);
static bool compressTimingsAndSortBuckets(unsigned int buckets[8], unsigned int *timings, unsigned int timings_size);
static void sendByTimings(int transmitterPin, unsigned int *timings, unsigned int timings_size, unsigned int repeats = 3);
static void sendByCompressedTimings(int transmitterPin, unsigned long* buckets, char* compressTimings, unsigned int repeats = 3);
static unsigned int getLastDuration();
static bool existNewDuration();
private:
RFControl();
};
#endif
first, i have issue with this line : static void getRaw(unsigned int **timings, unsigned int* timings_size);
what to do with **timings?
after, at xml creation, we have to define property / method
normally property should be a simple method with return and without parameter (like a get) or with a parameter but without return (like set) but from B4Rh2xml.jar run, it is not working in this way... What is the good way ?
and what is impact of static parameter in h file ? can we ignore it for wrapper?
and when we have uint getPulseLengthDivider(); in wrapper h file, in xml i have <name>PulseLengthDivider</name>
"get" is removed, is it normal and why ?
original library and first work on a wrapper are in zip attached, but i am stuck with unsigned int **timings : i didn't see similar examples of wrapper...
thanks for your help
Attachments
Last edited: