Skip to content

Commit

Permalink
[DRIVERS][TEMPLATES] File forgotten : Added the possibility to have T…
Browse files Browse the repository at this point in the history
…ASK/ISR/COUNTER/ALARM/RESOURCE/EVENT/MESSAGE in drivers. Needs to be tested
  • Loading branch information
jlbirccyn committed Nov 10, 2023
1 parent 1096fc3 commit 4f584df
Showing 1 changed file with 165 additions and 0 deletions.
165 changes: 165 additions & 0 deletions goil/templates/config/base.oil
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
/*
* Basic objects which can be used in drivers
*/
TASK [] {
BOOLEAN [
TRUE { APPMODE_TYPE APPMODE[]; },
FALSE
] AUTOSTART;
UINT32 PRIORITY;
UINT32 ACTIVATION;
ENUM [NON, FULL] SCHEDULE;
EVENT_TYPE EVENT[];
RESOURCE_TYPE RESOURCE[];
MESSAGE_TYPE MESSAGE[];
};

ISR [] {
UINT32 [1, 2] CATEGORY;
UINT32 PRIORITY; /* Trampoline extra */
RESOURCE_TYPE RESOURCE[];
MESSAGE_TYPE MESSAGE[];
};

COUNTER [] {
UINT32 MINCYCLE = 1;
UINT32 MAXALLOWEDVALUE = 65535;
UINT32 TICKSPERBASE = 1;
};

ALARM [] {
COUNTER_TYPE COUNTER;
ENUM [
ACTIVATETASK { TASK_TYPE TASK; },
SETEVENT { TASK_TYPE TASK; EVENT_TYPE EVENT; },
ALARMCALLBACK { STRING ALARMCALLBACKNAME; },
INCREMENTCOUNTER { COUNTER_TYPE COUNTER; }
] ACTION;
BOOLEAN [
TRUE { UINT32 ALARMTIME; UINT32 CYCLETIME; APPMODE_TYPE APPMODE[]; },
FALSE
] AUTOSTART;
};

EVENT [] {
UINT64 WITH_AUTO MASK;
};

RESOURCE [] {
ENUM [
STANDARD,
LINKED { RESOURCE_TYPE LINKEDRESOURCE; },
INTERNAL
] RESOURCEPROPERTY;
};

MESSAGE [] {
ENUM [
SEND_STATIC_INTERNAL {
STRING CDATATYPE;
},
SEND_STATIC_EXTERNAL {
STRING CDATATYPE;
ENUM WITH_AUTO [ TRIGGERED, PENDING ] TRANSFERPROPERTY = AUTO;
#include <filter.oil>
STRING NETWORKORDERCALLOUT = "";
STRING CPUORDERCALLOUT = "";
UINT64 WITH_AUTO INITIALVALUE = AUTO;
NETWORKMESSAGE_TYPE NETWORKMESSAGE;
},
SEND_DYNAMIC_EXTERNAL {
ENUM WITH_AUTO [ TRIGGERED, PENDING ] TRANSFERPROPERTY = AUTO;
STRING NETWORKORDERCALLOUT = "";
STRING CPUORDERCALLOUT = "";
UINT64 WITH_AUTO INITIALVALUE = AUTO;
NETWORKMESSAGE_TYPE NETWORKMESSAGE;
},
SEND_ZERO_INTERNAL,
SEND_ZERO_EXTERNAL {
STRING NETWORKORDERCALLOUT = "";
STRING CPUORDERCALLOUT = "";
NETWORKMESSAGE_TYPE NETWORKMESSAGE;
},
RECEIVE_ZERO_INTERNAL { MESSAGE_TYPE SENDINGMESSAGE; },
RECEIVE_ZERO_EXTERNAL {
STRING NETWORKORDERCALLOUT = "";
STRING CPUORDERCALLOUT = "";
NETWORKMESSAGE_TYPE NETWORKMESSAGE;
},
RECEIVE_UNQUEUED_INTERNAL {
MESSAGE_TYPE SENDINGMESSAGE;
#include <filter.oil>
UINT64 INITIALVALUE = 0;
},
RECEIVE_QUEUED_INTERNAL {
MESSAGE_TYPE SENDINGMESSAGE;
#include <filter.oil>
UINT64 INITIALVALUE = 0;
UINT32 QUEUESIZE;
},
RECEIVE_UNQUEUED_EXTERNAL {
STRING CDATATYPE;
#include <filter.oil>
BOOLEAN [
TRUE { MESSAGE_TYPE RECEIVEMESSAGE; },
FALSE {
STRING NETWORKORDERCALLOUT = "";
STRING CPUORDERCALLOUT = "";
NETWORKMESSAGE_TYPE NETWORKMESSAGE;
}
] LINK;
UINT64 WITH_AUTO INITIALVALUE = AUTO;
},
RECEIVE_QUEUED_EXTERNAL {
STRING CDATATYPE;
UINT32 QUEUESIZE;
#include <filter.oil>
BOOLEAN [
TRUE { MESSAGE_TYPE RECEIVEMESSAGE; },
FALSE {
STRING NETWORKORDERCALLOUT = "";
STRING CPUORDERCALLOUT = "";
NETWORKMESSAGE_TYPE NETWORKMESSAGE;
}
] LINK;
UINT64 WITH_AUTO INITIALVALUE = AUTO;
},
RECEIVE_DYNAMIC_EXTERNAL {
BOOLEAN [
TRUE { MESSAGE_TYPE RECEIVEMESSAGE; },
FALSE {
STRING NETWORKORDERCALLOUT = "";
STRING CPUORDERCALLOUT = "";
NETWORKMESSAGE_TYPE NETWORKMESSAGE;
}
] LINK;
UINT64 WITH_AUTO INITIALVALUE = AUTO;
},
RECEIVE_ZERO_SENDERS {
STRING CDATATYPE;
UINT64 INITIALVALUE = 0;
}
] MESSAGEPROPERTY;
ENUM [
NONE,
ACTIVATETASK { TASK_TYPE TASK; },
SETEVENT { TASK_TYPE TASK; EVENT_TYPE EVENT; },
COMCALLBACK { STRING CALLBACKROUTINENAME; MESSAGE_TYPE MESSAGE[]; },
FLAG { STRING FLAGNAME; },
INMCALLBACK {
STRING WITH_AUTO CALLBACKROUTINENAME;
UINT32 WITH_AUTO MONITOREDIPDU;
}
] NOTIFICATION = NONE;
ENUM [
NONE,
ACTIVATETASK { TASK_TYPE TASK; },
SETEVENT { TASK_TYPE TASK; EVENT_TYPE EVENT; },
COMCALLBACK { STRING CALLBACKROUTINENAME; MESSAGE_TYPE MESSAGE[]; },
FLAG { STRING FLAGNAME; },
INMCALLBACK {
STRING WITH_AUTO CALLBACKROUTINENAME;
UINT32 WITH_AUTO MONITOREDIPDU;
}
] NOTIFICATIONERROR = NONE;
};

0 comments on commit 4f584df

Please sign in to comment.