Binary Expression in FIDL

22 views
Skip to first unread message

Swami Dhyan Anurag

unread,
Sep 4, 2020, 2:48:51 PM9/4/20
to Franca
Hi,

I am trying to write something as below in FILD:
enumeration ABC {
ABC_NOK = 0x0000
ABC_OK = (0x020 | 0x0022)
}
Basically trying to use OR expression in enumeration but generator keeps giving error:
Error: Core validation: missing ')' at 'x020'
Error: Core validation: mismatched input '|' expecting '}' 
Error: Core validation: no viable alternative at input 'enumeration'

I will appreciate any pointers.

Regards,
anurag

Klaus Birken

unread,
Sep 5, 2020, 2:54:46 PM9/5/20
to Franca
Hi Anurag,

Franca IDL doesn't support bitwise operations like "|" or "&". The rationale behind this is to not encourage bit-operations when specifying interfaces. You could create an issue in order to document your requirement, but at this point in time it is quite unlikely that it will be added without further users requesting the same extension. We are trying to keep the IDL as stable as possible, in order to avoid requiring changes in downstream tools using Franca IDL as input.

Best regards,
Klaus

Swami Dhyan Anurag

unread,
Sep 5, 2020, 3:04:17 PM9/5/20
to Klaus Birken, Franca
Thank you Klaus for clarification.

I will manually fill the values for eums but yes it is way too much of manual work. Imagine creating 100s of vehicle property IDs which themselves are combinations of subcategories such as 
HVAC_TEMP=DOMAIN_COMFORT|TYPE_FLAOT|0x001

I will create  issue order hoping it help someone in future, in case needed.

Regards 
Swami Anurag

--


You received this message because you are subscribed to a topic in the Google Groups "Franca" group.


To unsubscribe from this topic, visit https://groups.google.com/d/topic/franca-framework/sZFarcKGib4/unsubscribe.


To unsubscribe from this group and all its topics, send an email to franca-framewo...@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/franca-framework/b75e5af2-95f4-4c2d-9520-cfde33bb14b0n%40googlegroups.com.


--
Regards,
swami dhyan anurag
Reply all
Reply to author
Forward
0 new messages