ENUM type?

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
toneill
Posts: 58
Joined: Tue Dec 03, 2019 5:46 pm

ENUM type?

#1 Post by toneill »

Good day. Hope you folks are doing well.

I have a question about dataref types. I am working on a cockpit for my Hotstart TBM 900 aircraft. I have the developers list of custom xpl_commands and datarefs. Occasionally they list the 'enum' data type.

In the AM API a search for 'enum' I see that it relates to some user defined properties.

Can someone enlighten me as to the use of this datatype.

Here is an example from Hotstart
description A/C mode switch position. 0 = OFF, 1 = MAN, 2 = AUTO
syntax tbm900/switches/ecs/ac_mode
type enum
writeable true

Thanks very much
Ted

User avatar
Corjan
Posts: 2941
Joined: Thu Nov 19, 2015 9:04 am

Re: ENUM type?

#2 Post by Corjan »

Hi Red,

Enumerations are not a base type like INT, FLOAT, etc.
Enums are normally implemented as INT though, so subscribing to them as INT should do the trick.

Corjan

toneill
Posts: 58
Joined: Tue Dec 03, 2019 5:46 pm

Re: ENUM type?

#3 Post by toneill »

Perfect. Thanks for the quick response Corjan.

Ted

Post Reply