本文整理汇总了C++中rtmSetErrorStatus函数的典型用法代码示例。如果您正苦于以下问题:C++ rtmSetErrorStatus函数的具体用法?C++ rtmSetErrorStatus怎么用?C++ rtmSetErrorStatus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rtmSetErrorStatus函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: udpRead_update
/* Model update function */
void udpRead_update(void)
{
/* Update for UnitDelay: '<S3>/FixPt Unit Delay2' incorporates:
* Constant: '<S3>/FixPt Constant'
*/
udpRead_DW.FixPtUnitDelay2_DSTATE = udpRead_P.FixPtConstant_Value;
/* Update for UnitDelay: '<S3>/FixPt Unit Delay1' */
udpRead_DW.FixPtUnitDelay1_DSTATE = udpRead_B.Xnew;
/* signal main to stop simulation */
{ /* Sample time: [0.001s, 0.0s] */
if ((rtmGetTFinal(udpRead_M)!=-1) &&
!((rtmGetTFinal(udpRead_M)-udpRead_M->Timing.taskTime0) >
udpRead_M->Timing.taskTime0 * (DBL_EPSILON))) {
rtmSetErrorStatus(udpRead_M, "Simulation finished");
}
if (rtmGetStopRequested(udpRead_M)) {
rtmSetErrorStatus(udpRead_M, "Simulation finished");
}
}
/* Update absolute time for base rate */
/* The "clockTick0" counts the number of times the code of this task has
* been executed. The absolute time is the multiplication of "clockTick0"
* and "Timing.stepSize0". Size of "clockTick0" ensures timer will not
* overflow during the application lifespan selected.
*/
udpRead_M->Timing.taskTime0 =
(++udpRead_M->Timing.clockTick0) * udpRead_M->Timing.stepSize0;
}
开发者ID:gte999s,项目名称:QuadCopter,代码行数:33,代码来源:udpRead.c
示例2: Hammerstein_step
/* Model step function */
void Hammerstein_step(void)
{
/* DiscreteStateSpace: '<S1>/LinearModel' */
{
Hammerstein_B.LinearModel = Hammerstein_P.LinearModel_C*
Hammerstein_DWork.LinearModel_DSTATE;
}
/* Level2 S-Function Block: '<S1>/Pwlinear1' (sfunpwlinear) */
{
SimStruct *rts = Hammerstein_M->childSfunctions[0];
ssSetOutputPortSignal(rts, 0, &Hammerstein_Y.Out1);
sfcnOutputs(rts, 0);
}
/* Level2 S-Function Block: '<S1>/Pwlinear' (sfunpwlinear) */
{
SimStruct *rts = Hammerstein_M->childSfunctions[1];
sfcnOutputs(rts, 0);
}
/* Update for DiscreteStateSpace: '<S1>/LinearModel' */
{
Hammerstein_DWork.LinearModel_DSTATE = Hammerstein_B.Pwlinear +
Hammerstein_P.LinearModel_A*Hammerstein_DWork.LinearModel_DSTATE;
}
/* Matfile logging */
rt_UpdateTXYLogVars(Hammerstein_M->rtwLogInfo, (Hammerstein_M->Timing.t));
/* signal main to stop simulation */
{ /* Sample time: [0.06s, 0.0s] */
if ((rtmGetTFinal(Hammerstein_M)!=-1) &&
!((rtmGetTFinal(Hammerstein_M)-Hammerstein_M->Timing.t[0]) >
Hammerstein_M->Timing.t[0] * (DBL_EPSILON))) {
rtmSetErrorStatus(Hammerstein_M, "Simulation finished");
}
if (rtmGetStopRequested(Hammerstein_M)) {
rtmSetErrorStatus(Hammerstein_M, "Simulation finished");
}
}
/* Update absolute time for base rate */
/* The "clockTick0" counts the number of times the code of this task has
* been executed. The absolute time is the multiplication of "clockTick0"
* and "Timing.stepSize0". Size of "clockTick0" ensures timer will not
* overflow during the application lifespan selected.
* Timer of this task consists of two 32 bit unsigned integers.
* The two integers represent the low bits Timing.clockTick0 and the high bits
* Timing.clockTickH0. When the low bit overflows to 0, the high bits increment.
*/
if (!(++Hammerstein_M->Timing.clockTick0)) {
++Hammerstein_M->Timing.clockTickH0;
}
Hammerstein_M->Timing.t[0] = Hammerstein_M->Timing.clockTick0 *
Hammerstein_M->Timing.stepSize0 + Hammerstein_M->Timing.clockTickH0 *
Hammerstein_M->Timing.stepSize0 * 4294967296.0;
}
开发者ID:MorS25,项目名称:Octodrone,代码行数:61,代码来源:Hammerstein.c
示例3: main
int main(int argc, char **argv)
{
printf("**starting the model**\n");
fflush(stdout);
rtmSetErrorStatus(Model_M, 0);
rtExtModeParseArgs(argc, (const char_T **)argv, NULL);
/* Initialize model */
Model_initialize();
/* External mode */
rtSetTFinalForExtMode(&rtmGetTFinal(Model_M));
rtExtModeCheckInit(1);
{
boolean_T rtmStopReq = false;
rtExtModeWaitForStartPkt(Model_M->extModeInfo, 1, &rtmStopReq);
if (rtmStopReq) {
rtmSetStopRequested(Model_M, true);
}
}
rtERTExtModeStartMsg();
/* Call RTOS Initialization funcation */
prosRTOSInit(0.2, 0);
/* Wait for stop semaphore */
mw_osSemaphoreWaitEver(&stopSem);
return 0;
}
开发者ID:FernbankLINKSRobotics,项目名称:GeorgiaBEST16,代码行数:31,代码来源:ert_main.c
示例4: motorController_initialize
/* Model initialize function */
void motorController_initialize(boolean_T firstTime)
{
if (firstTime) {
/* registration code */
/* initialize error status */
rtmSetErrorStatus(motorController_M, (const char_T *)0);
/* data type work */
{
int_T i;
real_T *dwork_ptr = (real_T *) &motorController_DWork.SpeedReg_DSTATE;
for (i = 0; i < 2; i++) {
dwork_ptr[i] = 0.0;
}
}
/* external inputs */
motorController_U.delta_r_sp = 0.0;
motorController_U.delta_r_act = 0.0;
motorController_U.angular_rate = 0.0;
motorController_U.current = 0.0;
/* external outputs */
motorController_Y.voltage = 0.0;
}
}
开发者ID:blickly,项目名称:ptii,代码行数:30,代码来源:motorController.c
示例5: baseRateTask
void baseRateTask(void *arg)
{
runModel = (rtmGetErrorStatus(Model_M) == (NULL)) && !rtmGetStopRequested
(Model_M);
while (runModel) {
mw_osSemaphoreWaitEver(&baserateTaskSem);
/* External mode */
{
boolean_T rtmStopReq = false;
rtExtModePauseIfNeeded(Model_M->extModeInfo, 1, &rtmStopReq);
if (rtmStopReq) {
rtmSetStopRequested(Model_M, true);
}
if (rtmGetStopRequested(Model_M) == true) {
rtmSetErrorStatus(Model_M, "Simulation finished");
break;
}
}
Model_step();
/* Get model outputs here */
rtExtModeCheckEndTrigger();
runModel = (rtmGetErrorStatus(Model_M) == (NULL)) && !rtmGetStopRequested
(Model_M);
}
runModel = 0;
terminateTask(arg);
taskDelete((void *)0);
}
开发者ID:FernbankLINKSRobotics,项目名称:GeorgiaBEST16,代码行数:33,代码来源:ert_main.c
示例6: model_jxz_initialize
/* Model initialize function */
void model_jxz_initialize(RT_MODEL_model_jxz *const model_jxz_M)
{
/* Registration code */
/* initialize error status */
rtmSetErrorStatus(model_jxz_M, (NULL));
}
开发者ID:jxz,项目名称:eece7368-fall11,代码行数:8,代码来源:model_jxz.cpp
示例7: floribot_accu_watchdog_initialize
/* Model initialize function */
void floribot_accu_watchdog_initialize(void)
{
/* Registration code */
/* initialize error status */
rtmSetErrorStatus(floribot_accu_watchdog_M, (NULL));
/* states (dwork) */
(void) memset((void *)&floribot_accu_watchdog_DW, 0,
sizeof(DW_floribot_accu_watchdog_T));
/* external inputs */
(void) memset((void *)&floribot_accu_watchdog_U, 0,
sizeof(ExtU_floribot_accu_watchdog_T));
/* external outputs */
floribot_accu_watchdog_Y.accu_low = FALSE;
/* InitializeConditions for Chart: '<Root>/Chart' */
floribot_accu_watchdog_DW.is_active_c1_floribot_accu_watc = 0U;
floribot_accu_watchdog_DW.is_c1_floribot_accu_watchdog =
floribot_acc_IN_NO_ACTIVE_CHILD;
/* InitializeConditions for Outport: '<Root>/accu_low' incorporates:
* InitializeConditions for Chart: '<Root>/Chart'
*/
floribot_accu_watchdog_Y.accu_low = FALSE;
}
开发者ID:TorstenHeverhagen,项目名称:de-floribot-software,代码行数:29,代码来源:floribot_accu_watchdog.cpp
示例8: c2000_profiler_initialize
/* Model initialize function */
void c2000_profiler_initialize(void)
{
/* Registration code */
/* initialize error status */
rtmSetErrorStatus(c2000_profiler_M, (NULL));
/* states (dwork) */
(void) memset((void *)&c2000_profiler_DWork, 0,
sizeof(D_Work_c2000_profiler));
/* external inputs */
(void) memset((void *)&c2000_profiler_U, 0,
sizeof(ExternalInputs_c2000_profiler));
/* external outputs */
(void) memset(&c2000_profiler_Y.Voltageoutputs[0], 0,
3U*sizeof(int32_T));
/* InitializeConditions for UnitDelay: '<S7>/Unit Delay' */
c2000_profiler_DWork.UnitDelay_DSTATE[0] =
c2000_profiler_P.UnitDelay_InitialCondition[0];
c2000_profiler_DWork.UnitDelay_DSTATE[1] =
c2000_profiler_P.UnitDelay_InitialCondition[1];
}
开发者ID:Velocar,项目名称:Bikair_MBD,代码行数:26,代码来源:c2000_profiler.c
示例9: Delay0_initialize
/* Model initialize function */
void Delay0_initialize(void)
{
/* Registration code */
/* initialize error status */
rtmSetErrorStatus(Delay0_M, (NULL));
/* states (dwork) */
(void) memset((void *)&Delay0_DW, 0,
sizeof(DW_Delay0_T));
/* external inputs */
(void) memset((void *)&Delay0_U, 0,
sizeof(ExtU_Delay0_T));
/* external outputs */
(void) memset(&Delay0_Y.Out1[0], 0,
2048U*sizeof(real_T));
{
int32_T i;
int32_T buffIdx;
/* InitializeConditions for S-Function (sdspvdly2): '<S1>/Variable Fractional Delay' */
Delay0_DW.VariableFractionalDelay_BUFF_OF = 44100;
buffIdx = 0;
for (i = 0; i < 44101; i++) {
Delay0_DW.VariableFractionalDelay_BUFF[buffIdx] = 0.0;
buffIdx++;
}
/* End of InitializeConditions for S-Function (sdspvdly2): '<S1>/Variable Fractional Delay' */
}
}
开发者ID:uRock-Lite,项目名称:Matlab-code-generation-example,代码行数:35,代码来源:Delay0.c
示例10: CelpSimulink_update
/* Model update function */
static void CelpSimulink_update(int_T tid)
{
{
static char sErr[512];
void *device = CelpSimulink_DWork.ToAudioDevice_AudioDevice;
AudioDeviceLibrary *adl = (AudioDeviceLibrary*)
&CelpSimulink_DWork.ToAudioDevice_AudioDeviceLib[0];
sErr[0] = 0;
if (device)
adl->deviceUpdate(device, sErr, CelpSimulink_B.DeemphasisFilter, 1, 1);
if (*sErr) {
DestroyAudioDeviceLibrary(adl);
rtmSetErrorStatus(CelpSimulink_M, sErr);
rtmSetStopRequested(CelpSimulink_M, 1);
}
}
/* Update absolute time for base rate */
if (!(++CelpSimulink_M->Timing.clockTick0))
++CelpSimulink_M->Timing.clockTickH0;
CelpSimulink_M->Timing.t[0] = CelpSimulink_M->Timing.clockTick0 *
CelpSimulink_M->Timing.stepSize0 + CelpSimulink_M->Timing.clockTickH0 *
CelpSimulink_M->Timing.stepSize0 * 4294967296.0;
UNUSED_PARAMETER(tid);
}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:26,代码来源:CelpSimulink.c
示例11: rt_OneStep
void rt_OneStep(ExternalInputs_microwave_combin *input)
{
static boolean_T OverrunFlag = 0;
/* Disable interrupts here */
/* Check for overrun */
if (OverrunFlag) {
rtmSetErrorStatus(microwave_combined_M, "Overrun");
return;
}
OverrunFlag = TRUE;
/* Save FPU context here (if necessary) */
/* Re-enable timer or interrupt here */
/* Set model inputs here */
microwave_combined_U = *input;
/* Step the model */
microwave_combined_step();
/* Get model outputs here */
check_observers ();
/* Indicate task complete */
OverrunFlag = FALSE;
/* Disable interrupts here */
/* Restore FPU context here (if necessary) */
/* Enable interrupts here */
}
开发者ID:jbiatek,项目名称:microwave,代码行数:32,代码来源:ert_main.c
示例12: omni_interface_terminate
/* Model terminate function */
void omni_interface_terminate(void)
{
/* S-Function Block: omni_interface/HIL Initialize (hil_initialize_block) */
{
t_boolean is_switching;
t_int result;
hil_task_stop_all(omni_interface_DWork.HILInitialize_Card);
hil_task_delete_all(omni_interface_DWork.HILInitialize_Card);
is_switching = false;
if ((omni_interface_P.HILInitialize_POTerminate && !is_switching) ||
(omni_interface_P.HILInitialize_POExit && is_switching)) {
omni_interface_DWork.HILInitialize_POValues[0] =
omni_interface_P.HILInitialize_POFinal;
omni_interface_DWork.HILInitialize_POValues[1] =
omni_interface_P.HILInitialize_POFinal;
omni_interface_DWork.HILInitialize_POValues[2] =
omni_interface_P.HILInitialize_POFinal;
result = hil_write_pwm(omni_interface_DWork.HILInitialize_Card,
&omni_interface_P.HILInitialize_POChannels[0], 3U,
&omni_interface_DWork.HILInitialize_POValues[0]);
if (result < 0) {
msg_get_error_messageA(NULL, result, _rt_error_message, sizeof
(_rt_error_message));
rtmSetErrorStatus(omni_interface_M, _rt_error_message);
}
}
hil_close(omni_interface_DWork.HILInitialize_Card);
omni_interface_DWork.HILInitialize_Card = NULL;
}
/* S-Function Block: omni_interface/Stream Answer (stream_answer_block) */
{
if (omni_interface_DWork.StreamAnswer_Client != NULL) {
stream_close(omni_interface_DWork.StreamAnswer_Client);
omni_interface_DWork.StreamAnswer_Client = NULL;
}
if (omni_interface_DWork.StreamAnswer_Listener != NULL) {
stream_close(omni_interface_DWork.StreamAnswer_Listener);
omni_interface_DWork.StreamAnswer_Listener = NULL;
}
}
/* S-Function Block: omni_interface/Stream Answer1 (stream_answer_block) */
{
if (omni_interface_DWork.StreamAnswer1_Client != NULL) {
stream_close(omni_interface_DWork.StreamAnswer1_Client);
omni_interface_DWork.StreamAnswer1_Client = NULL;
}
if (omni_interface_DWork.StreamAnswer1_Listener != NULL) {
stream_close(omni_interface_DWork.StreamAnswer1_Listener);
omni_interface_DWork.StreamAnswer1_Listener = NULL;
}
}
/* External mode */
rtExtModeShutdown(1);
}
开发者ID:ChristopherMcFaul,项目名称:Previous-Work,代码行数:61,代码来源:omni_interface.c
示例13: LookupTableDynamic_initialize
/* Model initialize function */
void LookupTableDynamic_initialize(void)
{
/* Registration code */
/* initialize error status */
rtmSetErrorStatus(LookupTableDynamic_M, (NULL));
/* block I/O */
/* exported global signals */
LookupTableDynamic_Constant_1[0] = 0.0;
LookupTableDynamic_Constant_1[1] = 0.0;
LookupTableDynamic_Constant_1[2] = 0.0;
LookupTableDynamic_Constant1_1[0] = 0.0;
LookupTableDynamic_Constant1_1[1] = 0.0;
LookupTableDynamic_Constant1_1[2] = 0.0;
LookupTableDynamic_LookupTableDynamic_1 = 0.0;
/* external inputs */
LookupTableDynamic_In1_1 = 0.0;
/* Start for Constant: '<Root>/Constant' */
LookupTableDynamic_Constant_1[0] = LookupTableDynamic_P.Constant_Value[0];
LookupTableDynamic_Constant_1[1] = LookupTableDynamic_P.Constant_Value[1];
LookupTableDynamic_Constant_1[2] = LookupTableDynamic_P.Constant_Value[2];
/* Start for Constant: '<Root>/Constant1' */
LookupTableDynamic_Constant1_1[0] = LookupTableDynamic_P.Constant1_Value[0];
LookupTableDynamic_Constant1_1[1] = LookupTableDynamic_P.Constant1_Value[1];
LookupTableDynamic_Constant1_1[2] = LookupTableDynamic_P.Constant1_Value[2];
}
开发者ID:ts1413,项目名称:test,代码行数:32,代码来源:LookupTableDynamic.c
示例14: Assignment_initialize
/* Model initialize function */
void Assignment_initialize(void)
{
/* Registration code */
/* initialize error status */
rtmSetErrorStatus(Assignment_M, (NULL));
/* block I/O */
/* exported global signals */
Assignment_Constant_1[0] = 0.0;
Assignment_Constant_1[1] = 0.0;
Assignment_Constant_1[2] = 0.0;
Assignment_Constant_1[3] = 0.0;
Assignment_Assignment_1[0] = 0.0;
Assignment_Assignment_1[1] = 0.0;
Assignment_Assignment_1[2] = 0.0;
Assignment_Assignment_1[3] = 0.0;
/* external inputs */
Assignment_In1_1 = 0.0;
/* ConstCode for Constant: '<Root>/Constant' */
Assignment_Constant_1[0] = 0.0;
Assignment_Constant_1[1] = 0.0;
Assignment_Constant_1[2] = 0.0;
Assignment_Constant_1[3] = 0.0;
}
开发者ID:ts1413,项目名称:test,代码行数:29,代码来源:Assignment.c
示例15: Crane_terminate
/* Model terminate function */
void Crane_terminate(void)
{
/* S-Function Block: <S10>/Block#1 */
{
if (rt_mech_visited_Crane_63fd34a2 == 1) {
_rtMech_PWORK *mechWork = (_rtMech_PWORK *) Crane_DWork.Block1_PWORK;
if (mechWork->mechanism->destroyEngine != NULL) {
(mechWork->mechanism->destroyEngine)(mechWork->mechanism);
}
}
if ((--rt_mech_visited_Crane_63fd34a2) == 0 ) {
rt_mech_visited_loc_Crane_63fd34a2 = 0;
}
}
/* S-Function Block: Crane/Falcon (falcon_block) */
{
t_error result;
result = falcon_close(Crane_DWork.Falcon_Falcon);
if (result < 0) {
msg_get_error_messageA(NULL, result, _rt_error_message, sizeof
(_rt_error_message));
rtmSetErrorStatus(Crane_M, _rt_error_message);
return;
}
}
/* External mode */
rtExtModeShutdown(2);
}
开发者ID:ChristopherMcFaul,项目名称:Previous-Work,代码行数:32,代码来源:Crane.c
示例16: Crane_derivatives
/* Derivatives for root system: '<Root>' */
void Crane_derivatives(void)
{
/* S-Function Block: <S10>/Block#1 */
{
_rtMech_PWORK *mechWork = (_rtMech_PWORK *) Crane_DWork.Block1_PWORK;
if (sFcnDerivativesMethod(mechWork->mechanism, &((StateDerivatives_Crane *)
Crane_M->ModelData.derivs)->Block1_CSTATE[0])) {
{
const ErrorRecord *err = getErrorMsg();
static char_T errorMsg[1024];
sprintf(errorMsg,
err->errorMsg,
err->blocks[0],
err->blocks[1],
err->blocks[2],
err->blocks[3],
err->blocks[4]);
rtmSetErrorStatus(Crane_M, errorMsg);
return;
}
}
}
/* Derivatives for Integrator: '<S9>/Integrator' */
((StateDerivatives_Crane *) Crane_M->ModelData.derivs)->Integrator_CSTATE[0] =
Crane_B.Sum[0];
((StateDerivatives_Crane *) Crane_M->ModelData.derivs)->Integrator_CSTATE[1] =
Crane_B.Sum[1];
((StateDerivatives_Crane *) Crane_M->ModelData.derivs)->Integrator_CSTATE[2] =
Crane_B.Sum[2];
}
开发者ID:ChristopherMcFaul,项目名称:Previous-Work,代码行数:32,代码来源:Crane.c
示例17: rt_OneStep
/*
* Associating rt_OneStep with a real-time clock or interrupt service routine
* is what makes the generated code "real-time". The function rt_OneStep is
* always associated with the base rate of the model. Subrates are managed
* by the base rate from inside the generated code. Enabling/disabling
* interrupts and floating point context switches are target specific. This
* example code indicates where these should take place relative to executing
* the generated code step function. Overrun behavior should be tailored to
* your application needs. This example simply sets an error status in the
* real-time model and returns from rt_OneStep.
*/
void rt_OneStep(void)
{
static boolean_T OverrunFlag = 0;
/* Disable interrupts here */
/* Check for overrun */
if (OverrunFlag) {
rtmSetErrorStatus(Wrap_To_Zero_M, "Overrun");
return;
}
OverrunFlag = true;
/* Save FPU context here (if necessary) */
/* Re-enable timer or interrupt here */
/* Set model inputs here */
/* Step the model */
Wrap_To_Zero_step();
/* Get model outputs here */
/* Indicate task complete */
OverrunFlag = false;
/* Disable interrupts here */
/* Restore FPU context here (if necessary) */
/* Enable interrupts here */
}
开发者ID:ts1413,项目名称:test,代码行数:41,代码来源:ert_main.c
示例18: watering_controller_AVR_initialize
/* Model initialize function */
void watering_controller_AVR_initialize(void)
{
/* Registration code */
/* initialize error status */
rtmSetErrorStatus(watering_controller_AVR_M, (NULL));
/* states (dwork) */
(void) memset((void *)&watering_controller_AVR_DW, 0,
sizeof(DW_watering_controller_AVR_T));
/* external inputs */
(void) memset((void *)&watering_controller_AVR_U, 0,
sizeof(ExtU_watering_controller_AVR_T));
/* external outputs */
watering_controller_AVR_Y.ValveRelay = 0U;
/* InitializeConditions for Chart: '<Root>/Watering_Controller' */
watering_controller_AVR_DW.is_automatic_mode = watering_con_IN_NO_ACTIVE_CHILD;
watering_controller_AVR_DW.is_manual_mode = watering_con_IN_NO_ACTIVE_CHILD;
watering_controller_AVR_DW.is_active_c3_watering_controlle = 0U;
watering_controller_AVR_DW.is_c3_watering_controller_AVR =
watering_con_IN_NO_ACTIVE_CHILD;
}
开发者ID:plin7498,项目名称:Greenhouse_Controller,代码行数:26,代码来源:watering_controller_AVR.c
示例19: rt_OneStep
/*
* Associating rt_OneStep with a real-time clock or interrupt service routine
* is what makes the generated code "real-time". The function rt_OneStep is
* always associated with the base rate of the model. Subrates are managed
* by the base rate from inside the generated code. Enabling/disabling
* interrupts and floating point context switches are target specific. This
* example code indicates where these should take place relative to executing
* the generated code step function. Overrun behavior should be tailored to
* your application needs. This example simply sets an error status in the
* real-time model and returns from rt_OneStep.
*/
void rt_OneStep(void)
{
/* Disable interrupts here */
/* Check for overrun */
if (OverrunFlag++) {
rtmSetErrorStatus(Pos_Controller_M, "Overrun");
return;
}
/* Save FPU context here (if necessary) */
/* Re-enable timer or interrupt here */
/* Set model inputs here */
/* Step the model */
Pos_Controller_step();
/* Get model outputs here */
/* Indicate task complete */
OverrunFlag--;
/* Disable interrupts here */
/* Restore FPU context here (if necessary) */
/* Enable interrupts here */
}
开发者ID:julesw,项目名称:ardrone_loclib,代码行数:37,代码来源:ert_main.cpp
示例20: rt_OneStep
void rt_OneStep(void)
{
static boolean_T OverrunFlag = 0;
/* Disable interrupts here */
/* Check for overrun */
if (OverrunFlag) {
rtmSetErrorStatus(Skydog_path_planning_M, "Overrun");
return;
}
OverrunFlag = TRUE;
/* Save FPU context here (if necessary) */
/* Re-enable timer or interrupt here */
/* Set model inputs here */
/* Step the model */
Skydog_path_planning_step();
/* Get model outputs here */
/* Indicate task complete */
OverrunFlag = FALSE;
/* Disable interrupts here */
/* Restore FPU context here (if necessary) */
/* Enable interrupts here */
}
开发者ID:voytik,项目名称:Firmware,代码行数:30,代码来源:ert_main.c
注:本文中的rtmSetErrorStatus函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论