forked from cubesatplatform/basestation_basic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbsoperations.cpp
More file actions
46 lines (28 loc) · 1004 Bytes
/
bsoperations.cpp
File metadata and controls
46 lines (28 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "bsoperations.h"
void CBSOperations::sendFile(CMsg &msg){ //TO:BSALL~ACT:SENDFILE~FIRST:0~LAST:20~FILE:UPDATE
writeconsoleln("Called Send File");
int chunk=0,first=0,last=-1;
std::string path="/dev/test/";
std::string filename=msg.getParameter("FILE","update");
first=msg.getParameter("FIRST",first);
last=msg.getParameter("LAST",first);
for(int chunk=first;chunk<=last;chunk++){
std::string fullpath=path;
fullpath+=filename;
fullpath+=tostring(chunk);
fullpath+=".bin";
writeconsoleln(fullpath);
/*sendRequestGet(fullpath.c_str()); ///////////////////// ????????????????????????????
CMsg m=receiveFile();
m.setTO(CUBESAT);
addTransmitList(m);
*/
}
//updateRadio(m);
}
void CBSOperations::callCustomFunctions(CMsg &msg) { //Used to be NewMsg
std::string sys=msg.getSYS();
std::string act=msg.getACT();
msg.writetoconsole();
if(act=="") {}
}