Build Output File Select
This commit is contained in:
@@ -34,6 +34,7 @@ type Proto struct {
|
||||
ProtocolHeader ProtocolHeader `json:"protocol"`
|
||||
ESP_TO_PC []ProtoMessage `json:"messages_esp_to_pc"`
|
||||
PC_TO_ESP []ProtoMessage `json:"messages_pc_to_esp"`
|
||||
FileName string `json:"filename,omitempty"`
|
||||
}
|
||||
|
||||
func (h *HexByte) UnmarshalJSON(data []byte) error {
|
||||
@@ -62,6 +63,7 @@ type PayloadStruct struct {
|
||||
}
|
||||
|
||||
type CStyleData struct {
|
||||
FileName string
|
||||
CenumPCTOESP Cenum
|
||||
CenumESPTOPC Cenum
|
||||
PayloadStructs []PayloadStruct
|
||||
@@ -105,6 +107,7 @@ func CreateCStyleHeader(proto *Proto) (string, error) {
|
||||
}
|
||||
|
||||
var data = CStyleData{
|
||||
FileName: proto.FileName,
|
||||
CenumPCTOESP: Cenum{
|
||||
EnumName: "PC_TO_ESP_MESSAGE_IDS",
|
||||
Entries: proto.PC_TO_ESP,
|
||||
@@ -148,6 +151,7 @@ func CreateCStyleSource(proto *Proto) (string, error) {
|
||||
}
|
||||
|
||||
var data = CStyleData{
|
||||
FileName: proto.FileName,
|
||||
CenumPCTOESP: Cenum{
|
||||
EnumName: "PC_TO_ESP_MESSAGE_IDS",
|
||||
Entries: proto.PC_TO_ESP,
|
||||
|
||||
Reference in New Issue
Block a user