V 10
1
LANG:1 8 (NoName)
PANEL,261 103 713 558 N "_3DFace" 0
EEE E E 1 -1 -1 0  -64 -5300
"" 0 1
EE 2
"CBRef""1"
"EClose"E
""
DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
LAYER, 0 
1
LANG:1 6 Layer1
25 0
"Table1"
""
1 -64 -5300 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
1 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
38 18 682 522
"main()
{
  EP_textFieldIn();
  EP_setInvalid();
}


EP_textFieldIn()
{
dyn_errClass err;
int crate;

  if( dpSubStr( \"SCTmops1:Info.Name:_online.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  
dpGet(\"Crate.Numb:_online.._value\", crate);
  dpConnect(\"EP_textFieldInCB\",
            \"Info.Name:_online.._value\", 
            \"Crate00.AlrmMesg.Message:_original.._value\");
  dpConnect(\"EP_textFieldInCB2\",          
            \"Crate00.Controller.CCchStat.Recv:_original.._value\");

  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dp, string sInfo )
{
  int row,col;
  time t;
  string tim;
  getValue(\"\", \"currentCell\", row, col);
    t=getCurrentTime();
	  tim=formatTime(\"%H:%M:%S\", t);
	setValue(\"\", \"appendLine\", row, \"#1\", tim, \"#2\", sInfo);
}


EP_textFieldInCB2(string dp, int sInfo )
{
  int row,col, crate;
  time t;
  string tim, text, DPvalue,hex;
  int error, val, number;
  float value;
  
 dpGet(\"Crate.Numb:_original.._value\", crate);

  sprintf(DPvalue,\"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
  dpGet(DPvalue,value);
  
  
  //transform status value
  val = value;
  number = (0x000000ff & val);
  //Debug(number);
  error  = (0x0000ff00 &val)>>8; 
  sprintf(hex,\"0x%02x\", error);
   
  if (number>128) {
     number = number - 128;
     text = \"ERROR: CC error, HVchannel:\"+number+\", code:\"+hex;
     }
  else {
     text = \"ERROR: CC error, LVchannel:\"+number+\", code:\"+hex;
     }
  
  getValue(\"\", \"currentCell\", row, col);
    t=getCurrentTime();
	  tim=formatTime(\"%H:%M:%S\", t);
	setValue(\"\", \"appendLine\", row, \"#1\", tim, \"#2\", text);
	

  
  //(value & 0x001) >> 0)
  //sprintf(xTmp,\"%x\", value);
 // setValue(\"\", \"text\", number);	
	
}

/*EP_textFieldInCB(string dp, string sNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, sNewValue, TRUE) );
}*/


EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTmops1:Info.Name:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTmops1:Info.Name:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}


" 0
 E 0 0 1 2 1 "#1" 0 1 0 "s" 1
LANG:1 2 #1
E1
LANG:1 0 
 80 "#2" 0 1 0 "s" 1
LANG:1 2 #2
E1
LANG:1 0 
 1000 25 25 "" 1 1
LANG:1 2 #1
8 100 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 1 1 0 0
1 0
0
LAYER, 1 
1
LANG:1 6 Layer2
0
LAYER, 2 
1
LANG:1 6 Layer3
0
LAYER, 3 
1
LANG:1 6 Layer4
0
LAYER, 4 
1
LANG:1 6 Layer5
0
LAYER, 5 
1
LANG:1 6 Layer6
0
LAYER, 6 
1
LANG:1 6 Layer7
0
LAYER, 7 
1
LANG:1 6 Layer8
0
0