Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plcrate: introduce command line parameter -s #117

Merged
merged 1 commit into from
Mar 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plc/Traffic2.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ signed Traffic2 (struct plc * plc)
while (devices-- > 1)
{
Transmit (plc, devicelist [0], devicelist [devices]);
Antiphon (plc, devicelist [devices], devicelist [0]);
if (_allclr (plc->flags, PLC_TXONLY))
{
Antiphon (plc, devicelist [devices], devicelist [0]);
}
}
}
return (0);
Expand Down
4 changes: 2 additions & 2 deletions plc/amprate.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void manager (struct plc * plc, signed count, signed pause)
{
PhyRates2 (plc);
}
if (_anyset (plc->flags, (PLC_TXONLY|PLC_RXONLY)))
if (_anyset (plc->flags, PLC_RXONLY))
{
RxRates2 (plc);
}
Expand Down Expand Up @@ -350,7 +350,7 @@ int main (int argc, char const * argv [])
}
argc -= optind;
argv += optind;
if (_allclr (plc.flags, (PLC_VERSION | PLC_LOCAL_TRAFFIC | PLC_NETWORK_TRAFFIC | PLC_RESET_DEVICE | PLC_TXONLY | PLC_RXONLY)))
if (_allclr (plc.flags, (PLC_VERSION | PLC_LOCAL_TRAFFIC | PLC_NETWORK_TRAFFIC | PLC_RESET_DEVICE | PLC_RXONLY)))
{
_setbits (plc.flags, PLC_NETWORK);
}
Expand Down
7 changes: 7 additions & 0 deletions plc/plcrate.1
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ Reads device hardware and software revision information using VS_SW_VER and prin
.RB - R
Resets the device using VS_RS_DEV.

.TP
.RB - s
Generate only TX traffic between the local device and each remote device on powerline network.
This option is useful to speed up PLC network testing if the test is run on every node and
each receiving side is checked individually. In other words: this flag is only used in combination
with \fB-t\fR (one-to-many), not when generating traffic between all powerline peers.

.TP
.RB - t
Generate powerline traffic between the local device and each remote device on each powerline network connected to the host.
Expand Down
6 changes: 5 additions & 1 deletion plc/plcrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int main (int argc, char const * argv [])
extern struct channel channel;
static char const * optv [] =
{
"cd:ei:l:o:nqrRtTuvw:x",
"cd:ei:l:o:nqrRstTuvw:x",
"device [device] [...]",
"Qualcomm Atheros PLC PHY Rate Monitor",
"c\tdisplay coded PHY rates",
Expand All @@ -242,6 +242,7 @@ int main (int argc, char const * argv [])
"q\tquiet mode",
"r\trequest device information",
"R\treset device with VS_RS_DEV",
"s\tgenerate TX traffic only",
"t\tgenerate network traffic (one-to-many)",
"T\tgenerate network traffic (many-to-many)",
"u\tdisplay uncoded PHY rates",
Expand Down Expand Up @@ -315,6 +316,9 @@ int main (int argc, char const * argv [])
case 'R':
_setbits (plc.flags, PLC_RESET_DEVICE);
break;
case 's':
_setbits (plc.flags, PLC_TXONLY);
break;
case 't':
_setbits (plc.flags, PLC_LOCAL_TRAFFIC);
break;
Expand Down