<commit_before>program gather("P=P,R=:M")

%%#include <stdio.h>
%%#include <stdlib.h>
%%#include <string.h>
option +r;
/* number of raw chars to receive from gathering 
   = 3 data sources x 1024 samples x (12 hex-chars + 1 lineend) + 2 end of stream chars
   = 39938 chars 
   Rounded to 40K = 40960
 */
   
#define MAX_RAW_CHARS 40960
#define N_ELEMENTS 1024
#define MAX_N_DATASRC 3
#define MAX_PV_STR_LEN 30
#define SIZE_DOUBLE 8

int execute; 					assign execute 			to "{P}{M}:EXECUTE.VAL";
string motor;					assign motor	 		to "{P}{M}:MOTOR";
string moveOut; 				assign moveOut 			to "{P}{M}:MOVE.OUT";
double moveVal; 				assign moveVal 			to "{P}{M}:MOVE.VAL";
double demandVal; 				assign demandVal 		to "{P}{M}:DEMAND.VAL";
string mrbvInpA; 				assign mrbvInpA 		to "{P}{M}:MRBV.INPA";
int sPeriod;					assign sPeriod 			to "{P}{M}:SPERIOD";
double tGather;					assign tGather			to "{P}{M}:TGATHER";
double tSample;					assign tSample			to "{P}{M}:TSAMPLE";
double tSampleB;				assign tSampleB			to "{P}{M}:TSAMPLE.B";
double tSampleC;				assign tSampleC			to "{P}{M}:TSAMPLE.C";
string stateMsg;				assign stateMsg			to "{P}{M}:STATE.VAL";
int axisNo;						assign axisNo			to "{P}{M}:AXISNO";
int pmacNo;						assign pmacNo			to "{P}{M}:PMACNO";
string moveTimeInpB;			assign moveTimeInpB		to "{P}{M}:MOVETIME.INPB";
string moveTimeInpC;			assign moveTimeInpC		to "{P}{M}:MOVETIME.INPC";
double moveTimeVal;				assign moveTimeVal		to "{P}{M}:MOVETIME.VAL";
int collecting;					assign collecting		to "{P}{M}:COLLECTING";
int parsing;					assign parsing			to "{P}{M}:PARSING";
int gathering;					assign gathering		to "{P}{M}:GATHERING";
string movingInpA;				assign movingInpA		to "{P}{M}:MOVING.INPA";
double timeRec[N_ELEMENTS];		assign timeRec			to "{P}{M}:TIME";
string asynRec;					assign asynRec			to "{P}{M}:ASYNREC.VAL";
string port;					assign port				to "{P}{M}:PORT.VAL";

/* place holders for the asyn record
 * use either {P}{M}:ASYN or for testing BL16B-MO-IOC-02:asyn
 */
string asynIfmt;				assign asynIfmt			to "";
string asynAout;				assign asynAout			to "";
string asynAinp;				assign asynAinp			to "";
string asynPcnct;				assign asynPcnct		to "";
string asynPort;				assign asynPort			to "";
int asynNord;					assign asynNord			to "";
char asynBinp[MAX_RAW_CHARS];	assign asynBinp			to "";
string motorOut;				assign motorOut			to "";


double waveformRecs[MAX_N_DATASRC][N_ELEMENTS];
assign waveformRecs to {
	"{P}{M}:POSN",
	"{P}{M}:FERR",
	"{P}{M}:VELO"};

int c;
double Ixx08;
double Ixx09;
double Ixx60;
double lenClkTick;
int I52;
int M72;
string tmpPvStr;

monitor execute;
monitor demandVal;
monitor motor;
monitor moveTimeVal;
monitor asynBinp;
monitor asynRec;
monitor asynPort;
monitor port;

evflag executeMon; 		sync execute 		executeMon;
evflag motorMon;	 	sync motor		 	motorMon;
evflag asynBinpMon;		sync asynBinp		asynBinpMon;
evflag asynRecMon;		sync asynRec		asynRecMon;
evflag asynPortMon;		sync asynPort		asynPortMon;
evflag portMon;			sync port			portMon;

/* define exacaped C functions at end of the file. */<commit_msg>pmacUtil: added monitor to tGather in statemachine.<commit_after>program gather("P=P,R=:M")

%%#include <stdio.h>
%%#include <stdlib.h>
%%#include <string.h>
option +r;
/* number of raw chars to receive from gathering 
   = 3 data sources x 1024 samples x (12 hex-chars + 1 lineend) + 2 end of stream chars
   = 39938 chars 
   Rounded to 40K = 40960
 */
   
#define MAX_RAW_CHARS 40960
#define N_ELEMENTS 1024
#define MAX_N_DATASRC 3
#define MAX_PV_STR_LEN 30
#define SIZE_DOUBLE 8

int execute; 					assign execute 			to "{P}{M}:EXECUTE.VAL";
string motor;					assign motor	 		to "{P}{M}:MOTOR";
string moveOut; 				assign moveOut 			to "{P}{M}:MOVE.OUT";
double moveVal; 				assign moveVal 			to "{P}{M}:MOVE.VAL";
double demandVal; 				assign demandVal 		to "{P}{M}:DEMAND.VAL";
string mrbvInpA; 				assign mrbvInpA 		to "{P}{M}:MRBV.INPA";
int sPeriod;					assign sPeriod 			to "{P}{M}:SPERIOD";
double tGather;					assign tGather			to "{P}{M}:TGATHER";
double tSample;					assign tSample			to "{P}{M}:TSAMPLE";
double tSampleB;				assign tSampleB			to "{P}{M}:TSAMPLE.B";
double tSampleC;				assign tSampleC			to "{P}{M}:TSAMPLE.C";
string stateMsg;				assign stateMsg			to "{P}{M}:STATE.VAL";
int axisNo;						assign axisNo			to "{P}{M}:AXISNO";
int pmacNo;						assign pmacNo			to "{P}{M}:PMACNO";
string moveTimeInpB;			assign moveTimeInpB		to "{P}{M}:MOVETIME.INPB";
string moveTimeInpC;			assign moveTimeInpC		to "{P}{M}:MOVETIME.INPC";
double moveTimeVal;				assign moveTimeVal		to "{P}{M}:MOVETIME.VAL";
int collecting;					assign collecting		to "{P}{M}:COLLECTING";
int parsing;					assign parsing			to "{P}{M}:PARSING";
int gathering;					assign gathering		to "{P}{M}:GATHERING";
string movingInpA;				assign movingInpA		to "{P}{M}:MOVING.INPA";
double timeRec[N_ELEMENTS];		assign timeRec			to "{P}{M}:TIME";
string asynRec;					assign asynRec			to "{P}{M}:ASYNREC.VAL";
string port;					assign port				to "{P}{M}:PORT.VAL";

/* place holders for the asyn record
 * use either {P}{M}:ASYN or for testing BL16B-MO-IOC-02:asyn
 */
string asynIfmt;				assign asynIfmt			to "";
string asynAout;				assign asynAout			to "";
string asynAinp;				assign asynAinp			to "";
string asynPcnct;				assign asynPcnct		to "";
string asynPort;				assign asynPort			to "";
int asynNord;					assign asynNord			to "";
char asynBinp[MAX_RAW_CHARS];	assign asynBinp			to "";
string motorOut;				assign motorOut			to "";


double waveformRecs[MAX_N_DATASRC][N_ELEMENTS];
assign waveformRecs to {
	"{P}{M}:POSN",
	"{P}{M}:FERR",
	"{P}{M}:VELO"};

int c;
double Ixx08;
double Ixx09;
double Ixx60;
double lenClkTick;
int I52;
int M72;
string tmpPvStr;

monitor execute;
monitor demandVal;
monitor motor;
monitor moveTimeVal;
monitor asynBinp;
monitor asynRec;
monitor asynPort;
monitor port;
monitor tGather;

evflag executeMon; 		sync execute 		executeMon;
evflag motorMon;	 	sync motor		 	motorMon;
evflag asynBinpMon;		sync asynBinp		asynBinpMon;
evflag asynRecMon;		sync asynRec		asynRecMon;
evflag asynPortMon;		sync asynPort		asynPortMon;
evflag portMon;			sync port			portMon;

/* define exacaped C functions at end of the file. */
{'fraction_non_alphanumeric': 0.12691501370746655, 'fraction_numerical': 0.015481373971940009, 'mean_word_length': 4.125619834710744, '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': '4195263', 'n_tokens_mistral': 2782, 'n_tokens_neox': 2445, 'n_words': 670}