<commit_before>
#ifndef MTR_SRV_H_
#define MTR_SRV_H_

#define NUM_MTRS 4
#define TIMEOUT 100	//100 * 10us = 1ms

typedef enum {
	IDLE=1,	//Ready for command
	CLIENT_REQ=2, //Client will set this first to alert other clients
	SRV_GRANT=4, //Server grants request by setting client ID = reqID
	RUN_CMD=8, //Client sets cmd id/data then sets flag to this state
	BUSY=16,		//Server busy processing command
	DATA_READY=32 //Signal the client to read the data, client must set back to ready
} srvState_t;

typedef struct {
	mtrID_t 		mtrID;
	cmdID_t 		cmdID;
	srvState_t	state;
	uint32_t		data;
	uint32_t		reqID;
	uint32_t		grantID;	
} mtrCmdIf_t;

typedef struct {
	int32_t	pos[NUM_MTRS];
	int32_t	cmdPos[NUM_MTRS];
	int32_t	vel[NUM_MTRS];
	int32_t	voltage[NUM_MTRS];
	uint32_t	status[NUM_MTRS];
} mtrTlmIf_t;

#endif<commit_msg>Setting up for switching over to 0mq<commit_after>
#ifndef MTR_SRV_H_
#define MTR_SRV_H_

#define NUM_MTRS 4
#define TIMEOUT 100	//100 * 10us = 1ms

typedef struct {
	double gearRatio[NUM_MTRS];
	double ctsPerRad[NUM_MTRS];
} mtrParms_t;

typedef enum {
	MOTION=0,
	PARAMETER
} mtrCmdType_t;

//The units are in radians and will be converted to encoder counts here out
typedef struct {
	double pos;
	double velMax;
	double velFinal;
	double accel;
} mtrMove_t;

typedef struct {
	mtrCmdType cmdType;			 //Is this a move or a parameter
	uint8_t	enabled[NUM_MTRS]; //If true that joints command/move will be processed
	mtrMove_t move[NUM_MTRS];   //motion details in radians
	cmdID_t cmdID[NUM_MTRS];	 //command ID for each joint
	uint32_t cmdData[NUM_MTRS]; //The data to tx with the command ID
} mtrCmdRcv_t;

typedef struct {
	uint32_t reply[NUM_MTRS];
} mtrCmdRep_t;


//Messages to publish to subscribers to display record data
typedef struct {
	int32_t	pos[NUM_MTRS];
	int32_t	cmdPos[NUM_MTRS];
	int32_t	vel[NUM_MTRS];
	int32_t	voltage[NUM_MTRS];
	uint32_t	status[NUM_MTRS];
} mtrTlmPub_t;

#endif
{'fraction_non_alphanumeric': 0.08099688473520249, 'fraction_numerical': 0.03167185877466251, 'mean_word_length': 4.537356321839081, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6471939', 'n_tokens_mistral': 865, 'n_tokens_neox': 796, 'n_words': 228}