<commit_before>#ifndef __UDS_TYPES_H__
#define __UDS_TYPES_H__

#include <isotp/isotp.h>
#include <stdint.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

// TODO This still doesn't have enough space for the largest possible 
// multiframe response. May need to dynamically allocate in the future.
#define MAX_UDS_RESPONSE_PAYLOAD_LENGTH 127
#define MAX_UDS_REQUEST_PAYLOAD_LENGTH 7
#define MAX_RESPONDING_ECU_COUNT 8
#define VIN_LENGTH 17

/* Private: The four main types of diagnositc requests that determine how the
 * request should be parsed and what type of callback should be used.
 *
 * TODO this may not be used...yet?<commit_msg>Reduced buffer size for stitched multiframe<commit_after>#ifndef __UDS_TYPES_H__
#define __UDS_TYPES_H__

#include <isotp/isotp.h>
#include <stdint.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

// April 2020 feature to pass up partial frames instead of buffering
// until we have a complete Diagnostic Response
#define STITCH_MULTIFRAME 1


#if (STITCH_MULTIFRAME==1)
// Only needs to be big enough to hold data in 1 Can message plus
// a small 3 byte header, The full length of the response will
// be stitiched in the client so we no longer need a large buffer
#define MAX_UDS_RESPONSE_PAYLOAD_LENGTH 11
#else
// TODO This still doesn't have enough space for the largest possible 
// multiframe response. May need to dynamically allocate in the future.
#define MAX_UDS_RESPONSE_PAYLOAD_LENGTH 127
#endif
#define MAX_UDS_REQUEST_PAYLOAD_LENGTH 7
#define MAX_RESPONDING_ECU_COUNT 8
#define VIN_LENGTH 17

/* Private: The four main types of diagnositc requests that determine how the
 * request should be parsed and what type of callback should be used.
 *
 * TODO this may not be used...yet?
{'fraction_non_alphanumeric': 0.06232294617563739, 'fraction_numerical': 0.013597733711048159, 'mean_word_length': 4.809210526315789, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3056659', 'n_tokens_mistral': 606, 'n_tokens_neox': 564, 'n_words': 227}