from nodelist import NodeList
from nodemanager import NodeManager
import config_utils, gen_cfile
from networkedit import networkedit
class _NetworkEditPlugg(networkedit):
def OnCloseFrame(self, event):
class BusController(NodeList):
XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="CanFestivalNode">
<xsd:attribute name="CAN_Device" type="xsd:string" use="required" />
ViewClass = _NetworkEditPlugg
def __init__(self, buspath):
NodeList.__init__(self, manager)
self.LoadProject(buspath)
def Generate_C(self, dirpath, locations):
return C code for network dictionnary
filepath = os.path.join(dirpath, "master.c")
master = config_utils.GenerateConciseDCF(locations, self)
res = gen_cfile.GenerateFile(filepath, master)
s = str(self.BaseParams.BusId)+"_IN(){}\n"
s += "CanOpen(str(\""+self.CanFestivalNode.CAN_Device)+"\")"
return {"headers":["master.h"],"sources":["master.c"]}
XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="CanFestivalInstance">
<xsd:attribute name="CAN_Driver" type="xsd:string" use="required" />
def Generate_C(self, filepath, locations):
return C code for network dictionnary
master = config_utils.GenerateConciseDCF(locations, self)
res = gen_cfile.GenerateFile(filepath, master)
s = str(self.BaseParams.BusId)+"_IN(){}\n"
s += "CanOpen(str(\""+self.CanFestivalNode.CAN_Device)+"\")"