Permalink
Browse files

client only issues one SESSION_START

  • Loading branch information...
1 parent 4e1876c commit 723a6112ea9d9366977564bc76f68f512e39a6eb Tyler Riddle committed Aug 5, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/Device/Firmdata.pm
View
@@ -15,6 +15,7 @@ has session => ( is => 'rw', does => 'Device::Firmdata::Role::Session' );
has clockCounterOverflow => ( is => 'ro', isa => 'Device::Firmdata::Util::Accumulator', required => 1, default => sub { Device::Firmdata::Util::Accumulator->new } );
has processorCounterOverflow => ( is => 'ro', isa => 'Device::Firmdata::Util::Accumulator', required => 1, default => sub { Device::Firmdata::Util::Accumulator->new } );
has lastHeartBeat => ( is => 'rw', isa => 'Num', required => 1, default => 0 );
+has sessionStartWait => ( is => 'rw', isa => 'Bool', required => 1, default => 0 );
#The clock counter is incrimented on the microcontroller at this interval and this is the minimum amount of time that can
#be represented
@@ -221,7 +222,11 @@ sub handleSystemMessage_beacon {
die "Received beacon message while the session was active";
}
- $self->sendCommand('SESSION_START');
+ if (! $self->sessionStartWait) {
+ $self->sessionStartWait(1);
+ $self->sendCommand('SESSION_START');
+ }
+
print STDERR "Session started at ", scalar(localtime()), "\n";
$self->session($self->build_session);

0 comments on commit 723a611

Please sign in to comment.