## ISC License## Copyright (c) 2016, Autonomous Vehicle Systems Lab, University of Colorado at Boulder## Permission to use, copy, modify, and/or distribute this software for any# purpose with or without fee is hereby granted, provided that the above# copyright notice and this permission notice appear in all copies.## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.#fromBasilisk.architectureimportsim_modelfromBasilisk.architectureimportsys_model_task
[docs]classProcessBaseClass(object):"""Class for a BSK process"""def__init__(self,procName,procPriority=-1):self.Name=procNameself.processData=sim_model.SysProcess(procName)self.processData.processPriority=procPrioritydefaddTask(self,newTask,taskPriority=-1):self.processData.addNewTask(newTask.TaskData,taskPriority)defaddInterfaceRef(self,newInt):self.processData.addInterfaceRef(newInt)defdiscoverAllMessages(self):self.processData.discoverAllMessages()defdisableAllTasks(self):self.processData.disableAllTasks()defenableAllTasks(self):self.processData.enableAllTasks()defselectProcess(self):passdefupdateTaskPeriod(self,TaskName,newPeriod):self.processData.changeTaskPeriod(TaskName,newPeriod)