<commit_before>//Example script for the EtherEventQueue library. Demonstrates advanced features.
//Periodically queues a test event, sends queued events, receives events and prints them to the serial monitor.
#include <SPI.h>  //these libraries are required by EtherEvent
#include "Ethernet.h"
#include "MD5.h"
//#include "Entropy.h"  //uncomment this line if you are using the Entropy library with EtherEvent
#include "EtherEvent.h"  //include the EtherEvent library so its functions can be accessed
#include "EtherEventQueue.h"  //include the EtherEvent library so its functions can be accessed
#include <utility/w5100.h>  //Used for setting the ethernet send connect timeout
//#include "Flash.h"  //uncomment this line if you are using the Flash library with EtherEventQueue

//configuration parameters - modify these values to your desired settings
#define DHCP false  //true==use DHCP to assign an IP address to the device, this will significantly increase memory usage. false==use static IP address.
byte MACaddress[] = {0, 1, 2, 3, 4, 4};  //this can be anything you like as long as it's unique on your network
#if DHCP == false
const IPAddress deviceIP = IPAddress(192, 168, 69, 104);  //IP address to use for the device. This can be any valid address on the network as long as it is unique. If you are using DHCP then this doesn't need to be configured.
#endif
const char password[] = "password";  //EtherEvent password. This must match the password set in EventGhost.
const unsigned int port = 1024;  //TCP port to receive events.
const byte maxQueueSize = 10;  //Maximum number of events to queue. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const byte maxSendEventLength = 8;  //Maximum event length to send. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const byte maxSendPayloadLength = 25;  //Maximum payload length to send. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const byte maxReceivedEventLength = 8;  //Maximum event length to receive. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const byte maxReceivedPayloadLength = 25;  //Maximum payload length to receive. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const unsigned int resendDelay = 30000;  //(ms)Delay before resending repeat or confirm type queued events.
const unsigned int nodeTimeoutDuration = 240000;  //(ms)If no event has been received from a node in greater than this duration then it is considered timed out.
const byte etherEventTimeout = 20;  //(ms)The max time to wait for ethernet communication.
const unsigned int W5100timeout = 400;  //(0.1ms)used to set the timeout for the w5100 module.
const byte W5100retransmissionCount = 1;  //Retransmission count. 1 is the minimum value.

const unsigned int queueEventInterval = 4000;  //(ms)Delay between queueing the test events.
const IPAddress sendIP = IPAddress(192, 168, 69, 100);  //The IP address to send the test events to.
const unsigned int sendPort = 1024;  //The port to send the test events to.

EthernetServer ethernetServer(port);  //TCP port to receive on<commit_msg>Correct type for nodeTimeoutDuration<commit_after>//Example script for the EtherEventQueue library. Demonstrates advanced features.
//Periodically queues a test event, sends queued events, receives events and prints them to the serial monitor.
#include <SPI.h>  //these libraries are required by EtherEvent
#include "Ethernet.h"
#include "MD5.h"
//#include "Entropy.h"  //uncomment this line if you are using the Entropy library with EtherEvent
#include "EtherEvent.h"  //include the EtherEvent library so its functions can be accessed
#include "EtherEventQueue.h"  //include the EtherEvent library so its functions can be accessed
#include <utility/w5100.h>  //Used for setting the ethernet send connect timeout
//#include "Flash.h"  //uncomment this line if you are using the Flash library with EtherEventQueue

//configuration parameters - modify these values to your desired settings
#define DHCP false  //true==use DHCP to assign an IP address to the device, this will significantly increase memory usage. false==use static IP address.
byte MACaddress[] = {0, 1, 2, 3, 4, 4};  //this can be anything you like as long as it's unique on your network
#if DHCP == false
const IPAddress deviceIP = IPAddress(192, 168, 69, 104);  //IP address to use for the device. This can be any valid address on the network as long as it is unique. If you are using DHCP then this doesn't need to be configured.
#endif
const char password[] = "password";  //EtherEvent password. This must match the password set in EventGhost.
const unsigned int port = 1024;  //TCP port to receive events.
const byte maxQueueSize = 10;  //Maximum number of events to queue. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const byte maxSendEventLength = 8;  //Maximum event length to send. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const byte maxSendPayloadLength = 25;  //Maximum payload length to send. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const byte maxReceivedEventLength = 8;  //Maximum event length to receive. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const byte maxReceivedPayloadLength = 25;  //Maximum payload length to receive. Longer entries will be truncated to this length. If this parameter is not passed then the default will be used.
const unsigned int resendDelay = 30000;  //(ms)Delay before resending repeat or confirm type queued events.
const unsigned long nodeTimeoutDuration = 240000;  //(ms)If no event has been received from a node in greater than this duration then it is considered timed out.
const byte etherEventTimeout = 20;  //(ms)The max time to wait for ethernet communication.
const unsigned int W5100timeout = 400;  //(0.1ms)used to set the timeout for the w5100 module.
const byte W5100retransmissionCount = 1;  //Retransmission count. 1 is the minimum value.

const unsigned int queueEventInterval = 4000;  //(ms)Delay between queueing the test events.
const IPAddress sendIP = IPAddress(192, 168, 69, 100);  //The IP address to send the test events to.
const unsigned int sendPort = 1024;  //The port to send the test events to.

EthernetServer ethernetServer(port);  //TCP port to receive on
{'fraction_non_alphanumeric': 0.06442992874109264, 'fraction_numerical': 0.025237529691211402, 'mean_word_length': 4.214396284829721, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '3313526', 'n_tokens_mistral': 1907, 'n_tokens_neox': 1705, 'n_words': 986}