DEVICE_ID List
vining
Posts: 4,368
Does anyone have an updated device id list. The one in PI was last updated "Last Modified Date:
10/25/07" and I'm looking for the ID's of the following new devices:
10/25/07" and I'm looking for the ID's of the following new devices:
NXD-500i NXD-435P NXD-435 NXD-430 NXV-300 MVP-5200i MVP-5150 MVP-5100 ENV-VST-CI'm trying to keep my function that determines feedback up to date and make sure it will still work as written with the new devices but I can't find this info anywhere.
0
Comments
NXD-500i = 331
MVP-5200i = 329
MVP-5150 = 329
MVP-5100 = 329
ENV-VST-C = $E5
Not listed yet
NXD-435P
NXD-435
NXD-430
NXV-300
I'd be interested in these as well if you find them.
One example would be sending certain page flips to certain devices. The way I have my R4s managed and the way I have my TPs managed are very different. In my R4s, I only have pages - no popups. This let's me flip quickly (and not rely on the processor) between pages within the source. In my TPs, the majority of the "pages" are actually popups.
In my page flip function, I determine whether i need to send an @PPN or a PAGE command. I consider the R4 a "TP" (of sorts), so it's in my dv_TP array. I don't have separate code for them (except when it comes to page flipping.)
If you look at the iPort UI module from AMX (kudos to Jon Parker), you will see he determines whether he can send a level to the device (if it's an R4 by default you cannot - but I do anyway.) He also checks to see if it's a G3 panel for legacy commands.
Just a few basic examples, I'm sure vining has some better ideas than me; I don't use it very often to be honest. I just compare to make sure it's NOT an R4. DEVICE_ID_STRING could be helpful too.
Colzie, again based on how it was used in the iPort module I've modified it and use it like this, I'm currently re-wroking it so pardon the mess.
DEFINE_CONSTANT //UI TYPES (Unknown=1, KP=2, R4=3, G3=4, G4=5) #DEFINE UI_TYPE_CONSTANTS UI_TYPE_UNKNOWN = 1 ; UI_TYPE_KP = 2 ; UI_TYPE_R4 = 3 ; UI_TYPE_G3 = 4 ; UI_TYPE_G4 = 5 ; CHAR UI_TYPE[][9] = { 'Unknown', //1 'Keypad', //2 'R4 Remote', //3 'G3 Panel', //4 'G4 Panel' //5 } ; DEFINE_CONSTANT //DEVICE ID's #DEFINE DEV_ID_CONSTANTS /////////////////////////////////KEYPADS DEV_ID_KP_BEGIN = 169 ; DEV_ID_MET6N = 169 ; DEV_ID_MET7 = 170 ; DEV_ID_MET13 = 171 ; DEV_ID_KP_END = 171 ; /////////////////////////////////R4 DEV_ID_R4 = 322 ; /////////////////////////////////G3 PANELS DEV_ID_G3_END = 256 ; DEFINE_EVENT //dvUI_ARRAY DATA EVENT DATA_EVENT [dvUI_Arry] { ONLINE: { STACK_VAR INTEGER nUI_Indx ; STACK_VAR INTEGER nDeviceID ; STACK_VAR INTEGER nValue ; //UI TYPES Unknown=1, KP=2, R4=3, G3=4, G4=5, nUI_Indx = GET_LAST(dvUI_Arry) ; nDeviceID = DEVICE_ID(dvUI_Arry[nUI_Indx]) ; if(!nUI_TypeArry[nUI_Indx])//only run if value hasn't been set already! { SELECT { ACTIVE(nDeviceID == 0)://?? No Number { nValue = 0 ; //DON'T SET LET IT TRY AGAIN NEXT TIME } ACTIVE(nDeviceID >= 169 && nDeviceID <= 171)://Metreau Keypads { nValue = UI_TYPE_KP ; } ACTIVE(nDeviceID == 322)://R4 { nValue = UI_TYPE_R4 ; } ACTIVE(nDeviceID < 256)://G3 panel { nValue = UI_TYPE_G3 ; } // ACTIVE(1)://?? No Number // { // nValue = UI_TYPE_UNKNOWN ; // } ACTIVE(1)://G4 //FIGURE OUT NUMBERS FOR THIS { nValue = UI_TYPE_G4 ; } } nUI_TypeArry[nUI_Indx] = nValue ; fnUI_DeBug("'UI Device: ',fnDEV_TO_STRING(dvUI_Arry[nUI_Indx]),' is a ',nUI_TypeArry[nValue], '. ** UI Type #',itoa(nValue),' **. >-Line-<',itoa(__LINE__),'>'") ; } } } DEFINE_FUNCTION fnTP_Send_VText (INTEGER iUI_Indx,nCHAN,CHAR strMSG[]) { if(iUI_Indx)//if iUI_Indx has value then send only to it, just came online, on page or needs refreshing { SWITCH(nUI_TypeArry[iUI_Indx]) { CASE UI_TYPE_G4: CASE UI_TYPE_R4: { STACK_VAR WIDECHAR strSTRING1[100] ; STACK_VAR CHAR strSTRING2[100] ; strSTRING1 = WC_DECODE(strMSG,WC_FORMAT_UTF8,1) ; // Used to Decode strSTRING2 = WC_ENCODE(strSTRING1,WC_FORMAT_TP,1) ;//WC_TP_ENCODE (strSTRING1) should be the same SEND_COMMAND dvSB_UIArry[iUI_Indx], "'^UNI-',ITOA(nCHAN),',0,',strSTRING2" } CASE UI_TYPE_G3: { SEND_COMMAND dvSB_UIArry[iUI_Indx], "'TEXT',ITOA(nCHAN),'-',strMSG" ; } CASE UI_TYPE_KP: CASE UI_TYPE_UNKNOWN: { //DO NOTHING } } } else //general feedback so send to all that are actively on this page for this instance of the device { STACK_VAR INTEGER nNumUI ; STACK_VAR INTEGER n ; nNumUI = LENGTH_ARRAY(nSB_ActiveTPArry) for(n = 1 ; n <= nNumUI ; n++) { if(nSB_ActiveTPArry[n] == nSB_ThisSB)//means it on this SB & Active on page { SWITCH(nUI_TypeArry[n]) { CASE UI_TYPE_G4: CASE UI_TYPE_R4: { STACK_VAR WIDECHAR strSTRING1[100] ; STACK_VAR CHAR strSTRING2[100] ; strSTRING1 = WC_DECODE(strMSG,WC_FORMAT_UTF8,1) ; // Used to Decode strSTRING2 = WC_ENCODE(strSTRING1,WC_FORMAT_TP,1) ;//WC_TP_ENCODE (strSTRING1) should be the same SEND_COMMAND dvSB_UIArry[n], "'^UNI-',ITOA(nCHAN),',0,',strSTRING2" } CASE UI_TYPE_G3: { SEND_COMMAND dvSB_UIArry[n], "'TEXT',ITOA(nCHAN),'-',strMSG" ; } CASE UI_TYPE_KP: CASE UI_TYPE_UNKNOWN: { //DO NOTHING } } } } } RETURN ; }The array nSB_ActiveTPArry[n] tracks the TPs so when a TP goes on page it's index position is set to the module instance it's control and when it goes off page it's set to 0. When it comes on page it's brought up to date and from then on feedback is only event driven. If it falls offline it's array value is again set to 0.
FYI, this hasn't been run since ripping it apart and putting it back together but you should be able to get the idea.
I'll do the same type of thing for levels and channels just so I can add specific requirements for that particular type of device.
nUI_Indx = GET_LAST(dvUI_Arry) ; if(!nUI_TypeArry[nUI_Indx])//only run if value hasn't been set already! { nDeviceID = DEVICE_ID(dvUI_Arry[nUI_Indx]) ;Why run the function DEVICE_ID again, that's was supposed to be the point of the "if".Has nothing for the 5200's. Where are you finding your version?
From the left hand side:
Home > Touch Panels and Accessories > Modero Touch Panels > MVP (Modero ViewPoint) Wireless Touch Panels > 5.2" Modero ViewPoint Touch Panels > MVP-5200i
Yeah, I had done that for a while (until I saw the iPort UI module), but it got hairy once you hard-coded for certain indexes, then if you had to wind up removing an index, or adding another panel . . . not fun to go through code and find where it referenced specific panels.