Remove extra white space at end of line and typo fixes (#699)

This commit contains  only style change: It removes extra white
space chars at the end of line, and fixes typos in the comments.
This commit is contained in:
Abtin Keshavarzian
2016-09-27 09:56:54 -07:00
committed by Jonathan Hui
parent 461495eed3
commit 4a06d7ac01
6 changed files with 316 additions and 316 deletions
+2 -2
View File
@@ -93,7 +93,7 @@ void TrickleTimer::IndicateConsistent(void)
void TrickleTimer::IndicateInconsistent(void)
{
// Only relavent if we aren't already at 'I' == 'Imin'
// Only relevant if we aren't already at 'I' == 'Imin'
if (IsRunning() && I != Imin)
{
// Reset I to Imin
@@ -161,7 +161,7 @@ void TrickleTimer::HandleTimerFired(void)
// We have just reached time 't'
case kPhaseTransmit:
{
// Are we not using reduncancy or is the counter still less than it?
// Are we not using redundancy or is the counter still less than it?
#ifdef ENABLE_TRICKLE_TIMER_SUPPRESSION_SUPPORT
if (k == 0 || c < k)
#endif
+1 -1
View File
@@ -79,7 +79,7 @@ public:
/**
* This constructor creates a trickle timer instance.
*
* @param[in] aScheduler A refrence to the timer scheduler.
* @param[in] aScheduler A reference to the timer scheduler.
* @param[in] aRedundancyConstant The redundancy constant for the timer, k.
* @param[in] aTransmitHandler A pointer to a function that is called when transmission should occur.
* @param[in] aIntervalExpiredHandler An optional pointer to a function that is called when the interval expires.
+1 -1
View File
@@ -80,7 +80,7 @@ public:
/**
* This method returns the Commissioner Session ID.
*
* @retuns The Commissioner Session ID.
* @returns The Commissioner Session ID.
*
*/
uint16_t GetSessionId(void) const;
+20 -20
View File
@@ -47,16 +47,16 @@ from Queue import Queue
class ARM(IThci):
firmware = 'Sep 9 2016 14:57:36'# keep the consistency with ARM firmware style
UIStatusMsg = ''
networkDataRequirement = '' # indicate Thread devicde requests full or stable network data
networkDataRequirement = '' # indicate Thread device requests full or stable network data
isPowerDown = False # indicate if Thread device experiences a power down event
isWhiteListEnabled = False # indicate if Thread device enables white list filter
isBlackListEnabled = False # indicate if Thread device enables black list filter
#def __init__(self, SerialPort=COMPortName, EUI=MAC_Address):
def __init__(self, **kwargs):
"""initialize the serial port and default netowrk parameters
"""initialize the serial port and default network parameters
Args:
**kwargs: Arbitrary keyword aruments
**kwargs: Arbitrary keyword arguments
Includes 'EUI' and 'SerialPort'
"""
try:
@@ -126,7 +126,7 @@ class ARM(IThci):
addressType: the specific type of IPv6 address
link local: link local unicast IPv6 address that's within one-hop scope
gloal: global unitcast IPv6 address
global: global unicast IPv6 address
rloc: mesh local unicast IPv6 address for routing in thread network
mesh EID: mesh Endpoint Identifier
@@ -628,7 +628,7 @@ class ARM(IThci):
def getGlobal(self):
"""get global unicast IPv6 address set
if configuring mutliple entries
if configuring multiple entries
"""
print '%s call getGlobal' % self.port
return self.__getIp6Address('global')
@@ -679,7 +679,7 @@ class ARM(IThci):
Returns:
True: successful to add a given extended address to the black list entry
False: fail to addd a given extended address to the black list entry
False: fail to add a given extended address to the black list entry
"""
print '%s call addBlockedMAC' % self.port
print xEUI
@@ -745,7 +745,7 @@ class ARM(IThci):
"""clear all entries in white list table
Returns:
True: successful to clearthe white list
True: successful to clear the white list
False: fail to clear the white list
"""
print '%s call clearAllowList' % self.port
@@ -1118,7 +1118,7 @@ class ARM(IThci):
Returns:
True: successful to remove the prefix entry from border router
False: fail to remove the prfix entry from border router
False: fail to remove the prefix entry from border router
"""
print '%s call removeRouterPrefix' % self.port
print prefixEntry
@@ -1165,13 +1165,13 @@ class ARM(IThci):
ModuleHelper.WriteIntoDebugLogger("resetAndRejoin() Error: " + str(e))
def configBorderRouter(self, P_Prefix, P_stable=1, P_default=1, P_slaac_preferred=0, P_Dhcp=0, P_preference=0, P_on_mesh=1, P_nd_dns=0):
"""configure the border router with a given preifx entry parameters
"""configure the border router with a given prefix entry parameters
Args:
P_Prefix: IPv6 prefix that is available on the Thread Network
P_stable: is true if the default router is expected to be stable network data
P_default: is true if border router offers the default route for P_Prefix
P_slaac_preferred: is true if Thread device is allowed autoconfigure address using P_Prefix
P_slaac_preferred: is true if Thread device is allowed auto-configure address using P_Prefix
P_Dhcp: is true if border router is a DHCPv6 Agent
P_preference: is two-bit signed integer indicating router preference
P_on_mesh: is true if P_Prefix is considered to be on-mesh
@@ -1217,7 +1217,7 @@ class ARM(IThci):
print cmd
if self.__sendCommand(cmd)[0] == 'Done':
# if prefix configured before starting OpenThread stack
# do not send out server data ntf proactively
# do not send out server data ntf pro-actively
if not self.__isOpenThreadRunning():
return True
else:
@@ -1348,7 +1348,7 @@ class ARM(IThci):
Returns:
True: successful to configure the border router with a given external route prefix
False: fail to configure the border router with a given exteranl route prefix
False: fail to configure the border router with a given external route prefix
"""
print '%s call configExternalRouter' % self.port
print P_Prefix
@@ -1380,10 +1380,10 @@ class ARM(IThci):
ModuleHelper.WriteIntoDebugLogger("configExternalRouter() Error: " + str(e))
def getNeighbouringRouters(self):
"""get neihbouring routers information
"""get neighboring routers information
Returns:
neihbouring routers' extended address
neighboring routers' extended address
"""
print '%s call getNeighbouringRouters' % self.port
try:
@@ -1501,11 +1501,11 @@ class ARM(IThci):
ModuleHelper.WriteIntoDebugLogger("setXpanId() Error: " + str(e))
def getNeighbouringDevices(self):
"""gets the neighbouring devices' extended address to compute the DUT
extended addresss automatically
"""gets the neighboring devices' extended address to compute the DUT
extended address automatically
Returns:
A list including extended address of neighbouring routers, parent
A list including extended address of neighboring routers, parent
as well as children
"""
print '%s call getNeighbouringDevices' % self.port
@@ -1522,7 +1522,7 @@ class ARM(IThci):
for entry in childNeighbours:
neighbourList.append(entry)
# get neighbouring routers info
# get neighboring routers info
routerNeighbours = self.getNeighbouringRouters()
if routerNeighbours != None and len(routerNeighbours) > 0:
for entry in routerNeighbours:
@@ -1750,7 +1750,7 @@ class ARM(IThci):
EncryptedPacket = PlatformDiagnosticPacket()
infoList = rawLogEach.split('[THCI]')[1].split(']')[0].split('|')
for eachInfo in infoList:
print eachInfo
print eachInfo
info = eachInfo.split("=")
infoType = info[0].strip()
infoValue = info[1].strip()
@@ -1825,7 +1825,7 @@ class ARM(IThci):
def setActiveTimestamp(self, xActiveTimestamp):
pass
def setUdpJoinerPort(self, portNumber):
def setUdpJoinerPort(self, portNumber):
"""set Joiner UDP Port
Args:
+1 -1
View File
@@ -186,7 +186,7 @@ static void signal_SIGTERM(int sig)
IGNORE_RETURN_VALUE(write(STDERR_FILENO, message, sizeof(message)-1));
// Restore the previous handler so that if we end up getting
// this signal again we peform the system default action.
// this signal again we perform the system default action.
signal(SIGTERM, sPreviousHandlerForSIGTERM);
sPreviousHandlerForSIGTERM = NULL;
(void) sig;
File diff suppressed because it is too large Load Diff