<commit_before><commit_msg>Added an RX only CPP demo<commit_after>#include <stdio.h>
#include <uVector.h>
#include <XbeeS6.h>
#include <string.h>

//#include <XBeeS6.h>

//#include "XbeeS6.h"
#define BAUD_RATE 9600

uint8_t my_buffer[20];

uint16_t dummy = 0x1419;

uint8_t dummyRx[] = {0x7E, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xA8, 0x00, 0x67, 0x2E, 0x00, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00};

Tx64Packet tx_packet;
RxPacket rx_packet;

uVector myvector;
uint8_t * tx_buffer1;

HardwareSerial Uart = HardwareSerial();

void setup()
{
  Serial.begin(BAUD_RATE);
  Serial.println("Starting the Receiver!");
  
  tx_packet.set_Address(0x00000000C0A8011E);  
//  tx_packet.set_Address(0x00000000FFFFFFFF);
  tx_packet.push_back(0x15);
  tx_packet.push_back(0x16);
  myvector.push_back(0x15);
  myvector.push_back(0x16);
  Serial.println(myvector[0], HEX);
  Serial.println(myvector[1], HEX);
  printf("printf test\n");
  
  memcpy(my_buffer, &dummy, sizeof(dummy));
  Serial.println(my_buffer[0], HEX);
  Serial.println(my_buffer[1], HEX);
  
  tx_buffer1 = get_buffer();
  
  Uart.begin(BAUD_RATE);
}
int j = 0;
int k = 0;
void loop()
{
  delay(2000);
  //while(j <  20)
  //{
  
  uint16_t length = tx_packet.prepare2send();
  uint16_t i;
  for(i = 0; i < length; i++)
  {
    Uart.print(tx_buffer1[i], BYTE);

  }
  for(i = 0; i < length; i++)
  {
    

    Serial.print(tx_buffer1[i], HEX); 
    Serial.print(" ");
  }
  Serial.println(' ');
  j++;
  tx_packet.clear_payload();
  tx_packet.push_back( (uint8_t) j);
 // }
  
//  if(k == 0)
//  {
//  Serial.println("Testing Rx Capabilities!");
//  uint16_t length = (dummyRx[2] | dummyRx[1] << 8);
//  Serial.println(length, HEX);
//  rx_packet.set_length(dummyRx[1], dummyRx[2]);
//  Serial.println(rx_packet.getlength(), HEX);
//  //offset in the packet stuff
//  for(int jk = 3; jk < rx_packet.getlength() + 3 + 1; jk++)
//  {
//     rx_packet.push_back( dummyRx[jk]);
//  }
//  
//  int status = rx_packet.process();
//  Serial.print("RX parsing returned: ");
//  Serial.println(status, HEX);
//  
//  for(int jk = 0; jk <= rx_packet.getlength(); jk++)
//  {
//   Serial.print(rx_packet[jk], BYTE); 
//  }
//    for(int jk = 0; jk <= rx_packet.getlength(); jk++)
//  {
//   Serial.print(rx_packet[jk], HEX); 
//  }
//  
//  rx_packet.clear();
//  //Serial.print('\n');
//  //Serial.println("Done!");
//
//   k = 1;
//  }
  
}
{'fraction_non_alphanumeric': 0.1952125464300454, 'fraction_numerical': 0.06644655385885266, 'mean_word_length': 3.3597122302158273, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 3, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6882384', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1057, 'n_words': 188}