Skip to content

Commit 8add4c3

Browse files
committed
msgbuf: rename GPSReceive and GPSTransmit
o GPSReceive -> MsgReceive o GPSTransmit -> MsgTransmit
1 parent 19a6700 commit 8add4c3

File tree

15 files changed

+53
-51
lines changed

15 files changed

+53
-51
lines changed

apps/tagmon/TagnetMonitorC.nc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
2-
* Copyright (c) 2015 Eric B. Decker
2+
* Copyright (c) 2020 Eric B. Decker
33
* Copyright (c) 2017-2019 Eric B. Decker, Daniel J. Maltbie
4+
* Copyright (c) 2015 Eric B. Decker
45
* All rights reserved.
56
*
67
* This program is free software: you can redistribute it and/or modify
@@ -43,8 +44,8 @@ implementation {
4344

4445
components GPS0C as GpsPort;
4546
GPSmonitorC.GPSControl -> GpsPort;
46-
GPSmonitorC.GPSTransmit -> GpsPort;
47-
GPSmonitorC.GPSReceive -> GpsPort;
47+
GPSmonitorC.MsgTransmit -> GpsPort;
48+
GPSmonitorC.MsgReceive -> GpsPort;
4849
GPSmonitorC.GPSPwr -> GpsPort;
4950

5051
components TagnetSysExecC;

doc/03_Ports

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ A singleton GPS port provided as GPS0.
7373
GPS0C: top level of GPS driver stack.
7474
GPSControl provides a mechanism for turning GPS on off, control state
7575
gps requests, gps power management requests
76-
GPSReceive mechanism for passing received gps messages to upper layers
76+
MsgReceive mechanism for passing received gps messages to upper layers
7777
of the system.
7878

7979
instantiates the driver Gsd4eUP (tos/chips/gsd4e_v4)

tos/chips/gsd4e_v4/GPSmonitorC.nc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ configuration GPSmonitorC {
2828
}
2929
uses {
3030
interface GPSControl;
31-
interface GPSTransmit;
32-
interface GPSReceive;
31+
interface MsgTransmit;
32+
interface MsgReceive;
3333
interface TagnetRadio;
3434
interface PwrReg as GPSPwr;
3535
}
@@ -41,8 +41,8 @@ implementation {
4141
InfoSensGpsCmd = GPSmonitorP;
4242

4343
GPSControl = GPSmonitorP;
44-
GPSTransmit = GPSmonitorP;
45-
GPSReceive = GPSmonitorP;
44+
MsgTransmit = GPSmonitorP;
45+
MsgReceive = GPSmonitorP;
4646
TagnetRadio = GPSmonitorP;
4747
GPSPwr = GPSmonitorP;
4848

tos/chips/gsd4e_v4/GPSmonitorP.nc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ module GPSmonitorP {
251251
} uses {
252252
interface Boot; /* in boot */
253253
interface GPSControl;
254-
interface GPSTransmit;
255-
interface GPSReceive;
254+
interface MsgTransmit;
255+
interface MsgReceive;
256256
interface PwrReg as GPSPwr;
257257

258258
interface Collect;
@@ -356,7 +356,7 @@ norace bool no_deep_sleep; /* true if we don't want deep sleep */
356356
gps_panic(-1, gps_msg[0] << 8 | gps_msg[1], gps_len);
357357
gps_len += SIRFBIN_OVERHEAD; /* add in overhead */
358358
gmcb.txq_state = GPSM_TXQ_SENDING;
359-
return call GPSTransmit.send(gps_msg, gps_len);
359+
return call MsgTransmit.send(gps_msg, gps_len);
360360
}
361361

362362

@@ -401,7 +401,7 @@ norace bool no_deep_sleep; /* true if we don't want deep sleep */
401401

402402
case GPSM_TXQ_SENDING:
403403
gmcb.txq_state = GPSM_TXQ_DRAIN;
404-
call GPSTransmit.send_stop();
404+
call MsgTransmit.send_stop();
405405
break;
406406

407407
case GPSM_TXQ_IDLE:
@@ -905,7 +905,7 @@ norace bool no_deep_sleep; /* true if we don't want deep sleep */
905905
}
906906

907907

908-
event void GPSTransmit.send_done() {
908+
event void MsgTransmit.send_done() {
909909
uint8_t mid;
910910
uint8_t *gps_msg;
911911

@@ -1866,7 +1866,7 @@ norace bool no_deep_sleep; /* true if we don't want deep sleep */
18661866
}
18671867

18681868

1869-
event void GPSReceive.msg_available(uint8_t *msg, uint16_t len,
1869+
event void MsgReceive.msg_available(uint8_t *msg, uint16_t len,
18701870
rtctime_t *arrival_rtp, uint32_t mark_j) {
18711871
sb_header_t *sbp;
18721872
dt_gps_t hdr;

tos/chips/gsd4e_v4/Gsd4eUP.nc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2020, Eric B. Decker
23
* Copyright (c) 2008-2010 Eric B. Decker
34
* Copyright (c) 2017-2018 Eric B. Decker, Daniel J. Maltbie
45
* All rights reserved.
@@ -419,7 +420,7 @@ norace uint32_t gps_chk_trys; // remaining chk_msgs to try CHK_MSG_WA
419420
module Gsd4eUP {
420421
provides {
421422
interface GPSControl;
422-
interface GPSTransmit;
423+
interface MsgTransmit;
423424
}
424425
uses {
425426
interface Gsd4eUHardware as HW;
@@ -732,7 +733,7 @@ implementation {
732733

733734
uint16_t m_tx_len;
734735

735-
command error_t GPSTransmit.send(uint8_t *ptr, uint16_t len) {
736+
command error_t MsgTransmit.send(uint8_t *ptr, uint16_t len) {
736737
gpsc_state_t next_state;
737738
error_t err;
738739
uint32_t time_out;
@@ -773,12 +774,12 @@ implementation {
773774
}
774775

775776

776-
default event void GPSTransmit.send_done() { }
777+
default event void MsgTransmit.send_done() { }
777778

778779

779780
task void send_block_task();
780781

781-
command void GPSTransmit.send_stop() {
782+
command void MsgTransmit.send_stop() {
782783
call HW.gps_send_block_stop();
783784
m_tx_len = 0;
784785
atomic {
@@ -830,10 +831,10 @@ implementation {
830831
call GPSTxTimer.stop();
831832
gpsc_change_state(GPSC_ON, GPSW_SEND_BLOCK_TASK);
832833

833-
/* signal out to the caller that started up the GPSTransmit.send */
834+
/* signal out to the caller that started up the MsgTransmit.send */
834835
if (m_tx_len) {
835836
m_tx_len = 0;
836-
signal GPSTransmit.send_done();
837+
signal MsgTransmit.send_done();
837838
}
838839
return;
839840

@@ -844,7 +845,7 @@ implementation {
844845
/* signal out to the caller that started up the GPSSend.send */
845846
if (m_tx_len) {
846847
m_tx_len = 0;
847-
signal GPSTransmit.send_done();
848+
signal MsgTransmit.send_done();
848849
}
849850
return;
850851
}

tos/chips/gsd4e_v4/tests/TestGPS/testGPSC.nc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ implementation {
2323
GPSmonitorC.TagnetRadio -> testGPSP;
2424

2525
GPSmonitorC.GPSControl -> GpsPort;
26-
GPSmonitorC.GPSReceive -> GpsPort;
27-
GPSmonitorC.GPSTransmit -> GpsPort;
26+
GPSmonitorC.MsgReceive -> GpsPort;
27+
GPSmonitorC.MsgTransmit -> GpsPort;
2828
GPSmonitorC.GPSPwr -> GpsPort;
2929

3030
InfoSensGpsXyz = GPSmonitorC;

tos/chips/gsd4e_v4/tests/testMsgBuf/testMsgBufC.nc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ implementation {
99
MsgBufP.Panic -> PanicC;
1010
MsgBufP.Rtc -> PlatformC;
1111

12-
testMsgBufP.GPSReceive -> MsgBufP;
12+
testMsgBufP.MsgReceive -> MsgBufP;
1313
testMsgBufP.MsgBuf -> MsgBufP;
1414
testMsgBufP.Platform -> PlatformC;
1515
}

tos/chips/gsd4e_v4/tests/testMsgBuf/testMsgBufP.nc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ uint16_t last_size;
88
module testMsgBufP {
99
uses {
1010
interface Boot;
11-
interface GPSReceive;
11+
interface MsgReceive;
1212
interface MsgBuf;
1313
interface Platform;
1414
}
@@ -47,7 +47,7 @@ implementation {
4747
}
4848

4949

50-
event void GPSReceive.msg_available(uint8_t *msg, uint16_t len,
50+
event void MsgReceive.msg_available(uint8_t *msg, uint16_t len,
5151
rtctime_t *rtp, uint32_t mark) {
5252
nop();
5353
recv_count++;

tos/interfaces/GPSReceive.nc renamed to tos/interfaces/MsgReceive.nc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017 Eric B. Decker
2+
* Copyright (c) 2017, 2020 Eric B. Decker
33
* All rights reserved.
44
*
55
* This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,7 @@
2020
*/
2121

2222
/*
23-
* GPSReceive.msg_available
23+
* MsgReceive.msg_available
2424
*
2525
* signals to a receiver that a new message is available from the GPS
2626
* subsystem.
@@ -41,7 +41,7 @@
4141

4242
#include <rtctime.h>
4343

44-
interface GPSReceive {
44+
interface MsgReceive {
4545
/*
4646
* msg_available
4747
*

tos/interfaces/GPSTransmit.nc renamed to tos/interfaces/MsgTransmit.nc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017 Eric B. Decker
2+
* Copyright (c) 2017, 2020 Eric B. Decker
33
* All rights reserved.
44
*
55
* This program is free software: you can redistribute it and/or modify
@@ -19,7 +19,7 @@
1919
* Contact: Eric B. Decker <[email protected]>
2020
*/
2121

22-
interface GPSTransmit {
22+
interface MsgTransmit {
2323
command error_t send(uint8_t *ptr, uint16_t len);
2424
command void send_stop();
2525
event void send_done();

0 commit comments

Comments
 (0)