# Copyright (C) 2013 INRIA
#
# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation;
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
from nepi.execution.attribute import Attribute, Flags, Types
from nepi.execution.resource import ResourceManager, clsinit_copy, \
- ResourceState, reschedule_delay
+ ResourceState
from nepi.resources.linux.ccn.ccnpingserver import LinuxCCNPingServer
from nepi.util.timefuncs import tnow, tdiffsec
@clsinit_copy
class LinuxCCNPing(LinuxCCNPingServer):
- _rtype = "LinuxCCNPing"
+ _rtype = "linux::CCNPing"
@classmethod
def _register_attributes(cls):
interval = Attribute("i",
"Set ping interval in seconds (minimum 0.10 second) ",
type = Types.Integer,
- flags = Flags.ExecReadOnly)
+ flags = Flags.Design)
count = Attribute("c",
"Total number of pings",
type = Types.Double,
- flags = Flags.ExecReadOnly)
+ flags = Flags.Design)
number = Attribute("n",
"Set the starting number, the number is incremented by 1 after each Interest ",
type = Types.Integer,
- flags = Flags.ExecReadOnly)
+ flags = Flags.Design)
prefix = Attribute("prefix",
"Prefix to serve content (e.g. ccnx:/name/prefix)",
- flags = Flags.ExecReadOnly)
+ flags = Flags.Design)
cls._register_attribute(interval)
cls._register_attribute(count)
self.ccnpingserver.state < ResourceState.STARTED:
self.debug("---- RESCHEDULING START---- ccnpingserver state %s " % \
self.ccnpingserver.state )
- self.ec.schedule(reschedule_delay, self.start)
+ self.ec.schedule(self.reschedule_delay, self.start)
else:
super(LinuxCCNPing, self).do_start()