mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Request info method
This commit is contained in:
parent
518288b86e
commit
af4eb134ae
41
gui/sock.js
41
gui/sock.js
|
@ -666,6 +666,47 @@ exports.sendMessage = function (
|
||||||
writeTncCommand(command);
|
writeTncCommand(command);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Send Request message
|
||||||
|
//It would be then „m + split + request + split + request-type“
|
||||||
|
function sendRequest (
|
||||||
|
dxcallsign,
|
||||||
|
mode,
|
||||||
|
frames,
|
||||||
|
data,
|
||||||
|
command
|
||||||
|
) {
|
||||||
|
data = btoa_FD(
|
||||||
|
"m" +
|
||||||
|
split_char +
|
||||||
|
command +
|
||||||
|
split_char +
|
||||||
|
data
|
||||||
|
);
|
||||||
|
command =
|
||||||
|
'{"type" : "arq", "command" : "send_raw", "parameter" : [{"dxcallsign" : "' +
|
||||||
|
dxcallsign +
|
||||||
|
'", "mode" : "' +
|
||||||
|
mode +
|
||||||
|
'", "n_frames" : "' +
|
||||||
|
frames +
|
||||||
|
'", "data" : "' +
|
||||||
|
data +
|
||||||
|
'", "attempts": "15"}]}';
|
||||||
|
socketLog.info(command);
|
||||||
|
socketLog.info("--------------REQ--------------------");
|
||||||
|
writeTncCommand(command);
|
||||||
|
};
|
||||||
|
|
||||||
|
//Send station info request
|
||||||
|
exports.sendRequestInfo = function (
|
||||||
|
dxcallsign,
|
||||||
|
mode,
|
||||||
|
frames
|
||||||
|
) {
|
||||||
|
//Command 0 = user/station information
|
||||||
|
sendRequest(dxcallsign,mode,frames,'0','req');
|
||||||
|
};
|
||||||
|
|
||||||
//STOP TRANSMISSION
|
//STOP TRANSMISSION
|
||||||
exports.stopTransmission = function () {
|
exports.stopTransmission = function () {
|
||||||
command = '{"type" : "arq", "command": "stop_transmission"}';
|
command = '{"type" : "arq", "command": "stop_transmission"}';
|
||||||
|
|
Loading…
Reference in a new issue