--- a/lib/C/iec_std_functions.h Wed Dec 26 12:39:41 2018 +0000
+++ b/lib/C/iec_std_functions.h Wed Dec 26 19:36:03 2018 +0000
@@ -1752,46 +1752,100 @@
return __time_add(IN1, IN2);
}
+/* overloaded version of ADD(TIME, TIME) */
+static inline TIME ADD__TIME__TIME__TIME(EN_ENO_PARAMS TIME IN1, TIME IN2){
+ TEST_EN(TIME)
+ return __time_add(IN1, IN2);
+}
+
static inline TOD ADD_TOD_TIME(EN_ENO_PARAMS TOD IN1, TIME IN2){
TEST_EN(TOD)
return __time_add(IN1, IN2);
}
+/* overloaded version of ADD(TOD, TIME) */
+static inline TOD ADD__TOD__TOD__TIME(EN_ENO_PARAMS TOD IN1, TIME IN2){
+ TEST_EN(TIME)
+ return __time_add(IN1, IN2);
+}
+
static inline DT ADD_DT_TIME(EN_ENO_PARAMS DT IN1, TIME IN2){
TEST_EN(DT)
return __time_add(IN1, IN2);
}
+/* overloaded version of ADD(DT, TIME) */
+static inline DT ADD__DT__DT__TIME(EN_ENO_PARAMS DT IN1, TIME IN2){
+ TEST_EN(TIME)
+ return __time_add(IN1, IN2);
+}
+
static inline TIME SUB_TIME(EN_ENO_PARAMS TIME IN1, TIME IN2){
TEST_EN(TIME)
return __time_sub(IN1, IN2);
}
+/* overloaded version of SUB(TIME, TIME) */
+static inline TIME SUB__TIME__TIME__TIME(EN_ENO_PARAMS TIME IN1, TIME IN2){
+ TEST_EN(TIME)
+ return __time_sub(IN1, IN2);
+}
+
static inline TIME SUB_DATE_DATE(EN_ENO_PARAMS DATE IN1, DATE IN2){
TEST_EN(TIME)
return __time_sub(IN1, IN2);
}
+/* overloaded version of SUB(DATE, DATE) */
+static inline TIME SUB__TIME__DATE__DATE(EN_ENO_PARAMS DATE IN1, DATE IN2){
+ TEST_EN(TIME)
+ return __time_sub(IN1, IN2);
+}
+
static inline TOD SUB_TOD_TIME(EN_ENO_PARAMS TOD IN1, TIME IN2){
TEST_EN(TOD)
return __time_sub(IN1, IN2);
}
+/* overloaded version of SUB(TOD, TIME) */
+static inline TOD SUB__TOD__TOD__TIME(EN_ENO_PARAMS TOD IN1, TIME IN2){
+ TEST_EN(TOD)
+ return __time_sub(IN1, IN2);
+}
+
static inline TIME SUB_TOD_TOD(EN_ENO_PARAMS TOD IN1, TOD IN2){
TEST_EN(TIME)
return __time_sub(IN1, IN2);
}
+/* overloaded version of SUB(TOD, TOD) */
+static inline TIME SUB__TIME__TOD__TOD(EN_ENO_PARAMS TOD IN1, TOD IN2){
+ TEST_EN(TIME)
+ return __time_sub(IN1, IN2);
+}
+
static inline DT SUB_DT_TIME(EN_ENO_PARAMS DT IN1, TIME IN2){
TEST_EN(DT)
return __time_sub(IN1, IN2);
}
+/* overloaded version of SUB(DT, TIME) */
+static inline DT SUB__DT__DT__TIME(EN_ENO_PARAMS DT IN1, TIME IN2){
+ TEST_EN(DT)
+ return __time_sub(IN1, IN2);
+}
+
static inline TIME SUB_DT_DT(EN_ENO_PARAMS DT IN1, DT IN2){
TEST_EN(TIME)
return __time_sub(IN1, IN2);
}
+/* overloaded version of SUB(DT, DT) */
+static inline TIME SUB__TIME__DT__DT(EN_ENO_PARAMS DT IN1, DT IN2){
+ TEST_EN(TIME)
+ return __time_sub(IN1, IN2);
+}
+
/*** MULTIME ***/
#define __iec_(TYPENAME)\
@@ -1802,6 +1856,15 @@
__ANY_NUM(__iec_)
#undef __iec_
+/*** MULTIME_TYPENAME ***/
+#define __iec_(TYPENAME)\
+static inline TIME MULTIME_##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
+ TEST_EN(TIME)\
+ return __time_mul(IN1, (LREAL)IN2);\
+}
+__ANY_NUM(__iec_)
+#undef __iec_
+
/*** MUL ***/
#define __iec_(TYPENAME)\
static inline TIME MUL__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
@@ -1820,6 +1883,15 @@
__ANY_NUM(__iec_)
#undef __iec_
+/*** DIVTIME_TYPENAME ***/
+#define __iec_(TYPENAME)\
+static inline TIME DIVTIME_##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
+ TEST_EN(TIME)\
+ return __time_div(IN1, (LREAL)IN2);\
+}
+__ANY_NUM(__iec_)
+#undef __iec_
+
/*** DIV ***/
#define __iec_(TYPENAME)\
static inline TIME DIV__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
--- a/lib/create_standard_function_txt.sh Wed Dec 26 12:39:41 2018 +0000
+++ b/lib/create_standard_function_txt.sh Wed Dec 26 19:36:03 2018 +0000
@@ -836,16 +836,25 @@
/*** Functions of time data types ***/
/**************************************/
-__function_2p(ADD_TIME, TIME, IN1, TIME, IN2, TIME)
-__function_2p(ADD_TOD_TIME, TOD, IN1, TOD, IN2, TIME)
-__function_2p(ADD_DT_TIME, DT, IN1, DT, IN2, TIME)
-
-__function_2p(SUB_TIME, TIME, IN1, TIME, IN2, TIME)
+__function_2p(ADD_TIME, TIME, IN1, TIME, IN2, TIME)
+__function_2p(ADD, TIME, IN1, TIME, IN2, TIME) /* overloaded function */
+__function_2p(ADD_TOD_TIME, TOD, IN1, TOD, IN2, TIME)
+__function_2p(ADD, TOD, IN1, TOD, IN2, TIME) /* overloaded function */
+__function_2p(ADD_DT_TIME, DT, IN1, DT, IN2, TIME)
+__function_2p(ADD, DT, IN1, DT, IN2, TIME) /* overloaded function */
+
+__function_2p(SUB_TIME, TIME, IN1, TIME, IN2, TIME)
+__function_2p(SUB, TIME, IN1, TIME, IN2, TIME) /* overloaded function */
__function_2p(SUB_DATE_DATE, TIME, IN1, DATE, IN2, DATE)
-__function_2p(SUB_TOD_TIME, TOD, IN1, TOD, IN2, TIME)
-__function_2p(SUB_TOD_TOD, TIME, IN1, TOD, IN2, TOD)
-__function_2p(SUB_DT_TIME, DT, IN1, DT, IN2, TIME)
-__function_2p(SUB_DT_DT, TIME, IN1, DT, IN2, DT)
+__function_2p(SUB, TIME, IN1, DATE, IN2, DATE) /* overloaded function */
+__function_2p(SUB_TOD_TIME, TOD, IN1, TOD, IN2, TIME)
+__function_2p(SUB, TOD, IN1, TOD, IN2, TIME) /* overloaded function */
+__function_2p(SUB_TOD_TOD, TIME, IN1, TOD, IN2, TOD )
+__function_2p(SUB, TIME, IN1, TOD, IN2, TOD ) /* overloaded function */
+__function_2p(SUB_DT_TIME, DT, IN1, DT, IN2, TIME)
+__function_2p(SUB, DT, IN1, DT, IN2, TIME) /* overloaded function */
+__function_2p(SUB_DT_DT, TIME, IN1, DT, IN2, DT )
+__function_2p(SUB, TIME, IN1, DT, IN2, DT ) /* overloaded function */
/*** MULTIME ***/