source: trunk/src/matlab/rpPutDoubleId.cc @ 125

Last change on this file since 125 was 115, checked in by mmc, 19 years ago

Updated all copyright notices.

File size: 1.5 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  INTERFACE: Matlab Rappture Library Source
4 *
5 *    rpPutDoubleId(libHandle,path,value,id,append)
6 *
7 * ======================================================================
8 *  AUTHOR:  Derrick Kearney, Purdue University
9 *  Copyright (c) 2004-2005  Purdue Research Foundation
10 *
11 *  See the file "license.terms" for information on usage and
12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 * ======================================================================
14 */
15
16#include "RpMatlabInterface.h"
17
18void mexFunction(int nlhs, mxArray *plhs[],
19                 int nrhs, const mxArray *prhs[])
20{
21    int         libIndex = 0;
22    int         append = 0;
23    RpLibrary*  lib = NULL;
24    RpLibrary*  retLib = NULL;
25    char*       path = NULL;
26    double      value = 0.0;
27    char*       id = NULL;
28
29    /* Check for proper number of arguments. */
30    if (nrhs != 5)
31        mexErrMsgTxt("Two input required.");
32    else if (nlhs > 0)
33        mexErrMsgTxt("Too many output arguments.");
34
35    libIndex = getIntInput(prhs[0]);
36    path = getStringInput(prhs[1]);
37    value = getDoubleInput(prhs[2]);
38    id = getStringInput(prhs[3]);
39    append = getIntInput(prhs[4]);
40
41    /* Call the C subroutine. */
42    if ( (libIndex > 0) && path && id) {
43        lib = getObject_Lib(libIndex);
44
45        if (lib) {
46            rpPutDoubleId(lib,path,value,id,append);
47        }
48    }
49
50    return;
51}
Note: See TracBrowser for help on using the repository browser.