The VisAO Camera
profileutils.c
1 
2 
3 #include "profileutils.h"
4 
5 
6 int parse_seqmsg(char *app, uint32_t *seqnum, const char * sm)
7 {
8  char *sn;
9 
10  app[0] = sm[0];
11  app[1] = sm[1];
12 
13  sn = (char*) seqnum;
14 
15  sn[0] = sm[0 + SEQ_NAME_LEN];
16  sn[1] = sm[1 + SEQ_NAME_LEN];
17  sn[2] = sm[2 + SEQ_NAME_LEN];
18  sn[3] = sm[3 + SEQ_NAME_LEN];
19 
20  return 0;
21 }
22 
23 
24 int load_seqmsg(char * sm, const char * app, uint32_t seqnum)
25 {
26  char *sn;
27 
28  sm[0] = app[0];
29  sm[1] = app[1];
30 
31  sn = (char*) &seqnum;
32 
33  sm[0 + SEQ_NAME_LEN] = sn[0];
34  sm[1 + SEQ_NAME_LEN] = sn[1];
35  sm[2 + SEQ_NAME_LEN] = sn[2];
36  sm[3 + SEQ_NAME_LEN] = sn[3];
37 
38  return 0;
39 }
40