You have to do it as you would do with string-based functions : void ErrorCodeToMsg(char buffer[], int code){ buffer = myListOfCodes[code]; } The value will be stored in the buffer using its reference value. It is not possible to return string in Capl. This is why you can't access String...
Instead of mstimer::isrunning use isTimerActive() method. isTimerActive() returns 1 if timers is running and 0 if it is expired. So your code will look like: on start{ for(noofChannel=1;noofChannel<=2;noofChannel++){ settimer(timer1,100); temp.CAN = noofChannel; temp.ID = 0xAA; While (isTimerActive(timer1) == 1) { //wait for timer to expire} } Output(temp); } } But...
It turns out CANalyzer does not (currently) have socket interface (CANoe does). Preferred interfacing method is via COM server (both CANalyzer and CANoe act as CAN server by default). See: https://www.vector.com/portal/medien/vector_cantech/faq/ProgrammingWithCAPL.pdf...