mcmd pseudo file
The special remote file 'mcmd' takes the form of an I/O driver where the file name is interpreted as a query and the retrieved data is the answer to this request. Except for the dsostream command that can also be open in write mode, 'mcmd' only supports read access. A file name for this driver has the following form:
mcmd:cmd[-opts][@mod[.submod]] cmdargs
- cmd:
- the operation to execute ( e.g. 'eval', 'profres'...).
- opts:
- options to change the format of the result. By default all data are sent using the Mosel binary format 'bin:'. Adding option 't' switches to text format (still compatible with initialisations blocks) and 'j' will cause results to be sent as a JSON object (not compatible with initialisations blocks). If option 'z' is used the resulting file is compressed with gzip. A given command may also support additional options (see 'lslib'). Except for the 'eval' command, the result set publishes always the same records that are either scalars of basic types or lists of basic types. When a collection of values is returned a specific label indicating the dimension of the list precedes the list.
- mod:
- master model on which the operation will be performed.
- submod:
- submodel. Only some operations can be applied to a submodel. Note that submodel '0' is the master model itself (the first submodel has ID '1').
Supported commands:
- covres (model)
-
Retrieve profiling results for test coverage. This command can only be called after the model has been run in profiling mode (see Section
Profiler interface).
tottime:real Rlines: range lines: array(Rlines) of integer iters: array(Rlines) of integer Rfiles: range files: array(Rfiles) of string Rstarts:range starts: array(Rstarts) of integer
- dbgbrkp [ lndx [ cond|* ] ] (model or submodel)
-
Breakpoint management. The model must be suspended. Without any parameters this command returns the current list of breakpoints; the first parameter is interpreted as a line index and the second parameter is a logical expression (
i.e. the breakpoint condition). With only one parameter, the breakpoint on the corresponding line index is removed (no operation is performed if there was no breakpoint). Use '*' to remove all breakpoints. With two parameters the corresponding breakpoint is created (or modified). To set an unconditional breakpoint use '*' as the condition. Note that breakpoints are attached to a model: even if several models running concurrently are resulting from the same source file, setting a breakpoint for one model (instance) will have no effect on the others.
Rlndx: range lndx: array(Rlndx) of integer cond: array(Rlndx) of string
- dbgflndx [ fctname|* ] (model or submodel)
-
Line indices corresponding to a function name. This command returns the line indices corresponding to the beginning of the requested function (several values are returned when the routine is overloaded). Without any arguments or with argument '*', the command returns all functions of the model. If option 'N' is used, the arrays are sorted according to the function names. With option 'L' arrays are sorted following the line indices order.
Rsign: range sign: array(Rsign) of string lndx: array(Rsign) of integer name: array(Rsign) of string
- dbglndx (model or submodel)
-
Retrieve the mapping of the
line indices of a model/submodel. The model must be either suspended or not running. The debugger interface works on
line indices: each line index corresponds to a file name and a line number in this file.
Rfiles: range files: array(Rlines:range) of integer Rlines: range lines: array(Rfiles:range) of string
- dbgstat (model or submodel)
-
Current execution status of a model. The model must be suspended. If no submodel is specified, statuses of all submodels are returned in addition to the master model (to get the status of the master model only use submodel '0').
Rid: range id: array(Rid) of integer stat: array(Rid) of integer stlev:array(Rid) of integer lndx: array(Rid) of integer
- dbgstlev [ stlev|* [ maxlev ] ] (model or submodel)
-
Stack management. The model must be suspended. Without any arguments or with argument '*', the command returns a stack dump (
i.e. a list of line indices). If the argument is ≥0, it becomes the current stack level. The optional argument 'maxlev' defines the maximum number of levels to return (default:10). The stack level defines the context in which expression evaluations are performed in the 'eval' command.
Rid: range id: array(Rid) of integer stat:array(Rid) of integer stlev:array(Rid) of integer lndx:array(Rid) of integer
- dsostream dsoname [specific parameters] (model or submodel)
- This command opens a stream to the specified module (this command supports both read and write mode). The module must implement the SRV_DSOSTRE service. The behaviour of the stream and the expected parameters depend on the implementation.
- eval label:expression [ range ] (model or submodel)
-
Evaluate an expression in the context of the provided model/submodel. Execution of the model must be completed or suspended. If option
'i' is used, array indices are reported as order numbers instead of values. With option
'n' array values are replaced by empty strings. The label "
label" is used to identify the expresion in the result file: if it is '.' no label is generated (the data result is directly sent to the result file), if it is omitted then the expression itself is used as the label, otherwise the provided string is the label. Several expressions may be evaluated in a single request (in this case they must all be labelled).
It is possible to grab only a part of a collection (array, set or list) by specifying range information. Ranges definitions take one of these two forms:- [ maxelt ]: get at most 'maxelt' elements
- [ skip maxelt ]: get at most 'maxelt' entries after skipping 'skip' elements
- info (instance, model or submodel)
-
This command reports all symbols defined by Mosel (if used without specifying any argument), a module (the argument is the module name) or a model (the argument is a model or submodel ID). In the case of a module, the command loads the module if it is not yet in memory. For a model (or package), it must have been loaded prior to this command since it is referenced by its ID and be either not running or suspended. Information returned by the 'info' command:
fmt: integer Rhdr: range hdr: array(Rhdr) of string Rdeps: range deps: array(Rdeps) of integer depsvers:array(Rdeps) of integer depstyp: array(Rdeps) of integer Rtyps: range typs: array(Rtyps) of string typscod: array(Rtyps) of integer Rparms: range parms: array(Rparms) of string parmsval:array(Rparms) of integer parmsdesc:array(Rparms) of string Rconsts: range consts: array(Rconsts) of string conststyp:array(Rconsts) of integer Rcstint: range cstint: array(Rcstint) of integer Rcststr: range cststr: array(Rcststr) of string Rcstdbl: range cstdbl: array(Rcstdbl) of real Rvars: range vars: array(Rvars) of string varstyp: array(Rvars) of integer Rarrndx: range arrndx: array(Rarrndx) of string Rfct: range fct: array(Rfct) of string fctsign: array(Rfct) of string fcttyp: array(Rfct) of integer Rdtyp: range dtyp: array(Rdtyp:range) of string dtyptyp: array(Rdtyp) of integer Rrecsstart:range recsstart:array(Rrecsstart) of integer Rrecfield:range recfield:array(Rrecfield) of string recftype:array(Rrecfield) of integer Riodrv: range iodrv: array(Riodrv) of string iodrvinfo:array(Riodrv) of string Rannsident:range annsident:array(Rannsidente) of string Rannsstart:range annsstart:array(Rannsstart) of integer Ranns: range anns: array(Ranns) of string
- lsattr (model or submodel)
-
Return the list of available types attributes. The array 'attrsntyp' gives the type supporting the attribute and 'attrsatyp' is the type of the attribute.
Rattrs: range attrs: array(Rattrs) of string attrsntyp: array(Rattrs) of integer attrsatyp: array(Rattrs) of integer
- lslib (instance)
-
Return the list of available packages and modules. If option 'p' is used, packages are reported with their full path.
Rpkgs: range pkgs: array(Rpkgs) of string Rdsos: range dsos: array(Rdsos) of string
- lsloc (model or submodel)
-
This command is similar to 'info' but it can only be applied to a suspended model: it reports all local variables.
Rtyps: range typs: array(Rtyps) of string typscod: array(Rtyps) of integer Rvars: range vars: array(Rvars) of string varstyp: array(Rvars) of integer Rarrndx: range arrndx: array(Rarrndx) of string
- profres [ path ] (model)
-
Retrieve profiling results. This command can only be called after the model has been run in profiling mode (see Section
Profiler interface). The
path argument indicates which execution is requested: several "executions" may be available when the model starts other models with 'mmjobs' (the returned data set includes the number of additional executions available via the
nbsub field). For instance the path
1.3 corresponds to the third "execution" started by the first "execution".
tottime:real nbsub: integer nbnoprf:integer Rlines: range lines: array(Rlines) of integer iters: array(Rlines) of integer times: array(Rlines) of real elaps: array(Rlines) of real Rfiles: range files: array(Rfiles) of string Rstarts:range starts: array(Rstarts) of integer
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.