Experimental Physics and
| |||||||||||||||||
|
In case of the asub record, I will have sth like: record(waveform, "$(P)$(R)DIRS") { field(DESC, "File structure") field(PINI, "YES") field(DTYP, "stream") field(NELM, "100") field(FTVL, "STRING") field(INP, "@devTPS20xx.proto DIRS $(PORT) $(A)") field(SCAN, "Passive") field(FLNK, "$(P)$(R)DIRS_sub") } record(aSub, "$(P)$(R)DIRS_sub") { field(DESC, "DIRS processing") field(INAM, "dirs_init") field(SNAM, "transform_dirs") field(INPA, "$(P)$(R)DIRS") field(FTA, "STRING") field(NOA, "100") field(FTVA, "STRING") field(NOVA, "100") field(INPB, "$(P)$(R)DIRS.NORD") field(FTB, "ULONG") } So my transformation routine will receive the address of the asub record structure: static long transform_dirs(aSubRecord *precord) { char** data = "" /* ???? */ char** output = (char**)precord->vala; /* ???? */ size_t size = *(unsigned long*)precord->b; for(int i=0;i<size;i++) { *output[i]=*char[i]; } *(unsigned long*)precord->NOVA=size; } My initial waveform of strings is an array of strings. How is it allocated (organized) in the memory? As sequence of (char**) pointers? So it goes like: pointer1 pointer2 ............ pointer($(P)$(R)DIRS.NELM=100) Am I correct? Pavel On Thu, May 31, 2012 at 4:10 PM, Kasemir, Kay <[email protected]> wrote: Hi: -- Best regards, Pavel Maslov, MS Controls Engineer at Pulsed power Lab Efremov Institute for Electro-Physical Apparatus St. Petersburg, Russia Mobile: +7 (951) 672 22 19 Landline: +7 (812) 461 01 01
| ||||||||||||||||
ANJ, 18 Nov 2013 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |