ADMB Documentation  11.1.1649
 All Classes Files Functions Variables Typedefs Friends Defines
spcomm.h
Go to the documentation of this file.
00001 /*
00002  * $Id: spcomm.h 1112 2013-07-12 21:41:41Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  *
00007  * ADModelbuilder and associated libraries and documentations are
00008  * provided under the general terms of the "BSD" license.
00009  *
00010  * License:
00011  *
00012  * Redistribution and use in source and binary forms, with or without
00013  * modification, are permitted provided that the following conditions are
00014  * met:
00015  *
00016  * 1. Redistributions of source code must retain the above copyright
00017  * notice, this list of conditions and the following disclaimer.
00018  *
00019  * 2.  Redistributions in binary form must reproduce the above copyright
00020  * notice, this list of conditions and the following disclaimer in the
00021  * documentation and/or other materials provided with the distribution.
00022  *
00023  * 3.  Neither the name of the  University of California, Otter Research,
00024  * nor the ADMB Foundation nor the names of its contributors may be used
00025  * to endorse or promote products derived from this software without
00026  * specific prior written permission.
00027  *
00028  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00029  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00030  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00031  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00032  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00033  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00034  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00035  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00036  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00037  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00038  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00039  *
00040  */
00041 #ifndef __SPCOMM__
00042 #define __SPCOMM__
00043 #include <windows.h>
00044 #include <windows.h>
00045 #if defined (__BORLANDC__)
00046 #  include <winnt.h>
00047 #endif
00048 #include <ddeml.h>
00049 #include <admodel.h>
00050 
00051 void printconnectstatus(int status);
00052 void printInitializestatus(int status);
00053 
00054 
00055 
00056 class DDEspclient
00057 {
00058   static DWORD idInst;
00059   static DWORD sleeptime;
00060   static HCONV cstatus;
00061   static UINT status;
00062 public:
00063   DDEspclient(DWORD sleeptime=1000);
00064   static HCONV get_cstatus(void){return cstatus;}
00065   static DWORD get_idInst(void){return idInst;}
00066   static DWORD get_sleeptime(void){return sleeptime;}
00067 
00068 };
00069 
00070 void SPreceive(const data_number& x, const adstring& name);
00071 
00072 void SPreceive(const data_number& x);
00073 
00074 void SPreceive(const dvariable& x,const adstring& name);
00075 
00076 void SPreceive(const double& x, const adstring& name);
00077 
00078 void SPreceive(const named_dvariable& x);
00079 
00080 void SPreceive(const dvector& x, const adstring& name);
00081 
00082 void SPreceive(const named_dvector& x);
00083 
00084 void SPreceive(const named_dvar_matrix& x);
00085 
00086 void SPreceive(const dvar_vector& x, const adstring& name);
00087 
00088 void SPreceive(const named_dvar_vector& x);
00089 
00090 void SPreceive(const named_dmatrix& x);
00091 
00092 void SPreceive_double(const double& x, const adstring& name);
00093 
00094 void SPreceive_double(const dmatrix& x, const adstring& name);
00095 
00096 void SPsend(const dmatrix& x, const adstring& name);
00097 
00098 void SPsend(const double& x, const adstring& name);
00099 
00100 void SPsend(const dvector& x, const adstring& name);
00101 
00102 void SPsend(const named_dvector& x);
00103 
00104 void SPsend(const named_dvariable& x);
00105 
00106 void SPsend(const named_dvar_vector& x);
00107 
00108 void SPsend(const named_dvar_matrix& x);
00109 
00110 void SPsend(const named_dmatrix& x);
00111 
00112 void SPexecute( LPBYTE  cbuff,HCONV cstatus);
00113 
00114 
00115 void SPsend_char(char * pch,HCONV cstatus);
00116 
00117 
00118 
00119 /*
00120 class DDEspclient
00121 {
00122   static DWORD idInst;
00123   static DWORD sleeptime;
00124   static HCONV cstatus;
00125   static UINT status;
00126 public:
00127   DDEspclient(DWORD sleeptime=1000);
00128   static HCONV get_cstatus(void){return cstatus;}
00129   static DWORD get_idInst(void){return idInst;}
00130   static DWORD get_sleeptime(void){return sleeptime;}
00131 
00132 };
00133 
00134 HDDEDATA SPreceive(const dvector& x, const adstring& name);
00135 
00136 HDDEDATA SPreceive(const named_dvector& x);
00137 
00138 HDDEDATA SPreceive(const named_dvar_matrix& x);
00139 
00140 HDDEDATA SPreceive(const named_dmatrix& x);
00141 
00142 HDDEDATA SPreceive_double(const double& x, const adstring& name);
00143 
00144 
00145 HDDEDATA SPsend(const dvector& x, const adstring& name);
00146 
00147 HDDEDATA SPsend(const named_dvector& x);
00148 
00149 HDDEDATA SPsend(const named_dvar_matrix& x);
00150 
00151 HDDEDATA SPsend(const named_dmatrix& x);
00152 
00153 HDDEDATA SPexecute( LPBYTE  cbuff,HCONV cstatus);
00154 
00155 
00156 HDDEDATA SPsend_char(char * pch,HCONV cstatus);
00157 */
00158 
00159 #endif