Documentation Center

  • Trial Software
  • Product Updates

Contents

ssGetDWork

Get a DWork vector

Syntax

void *ssGetDWork(SimStruct *S, int_T vector)

Arguments

S

SimStruct representing an S-Function block.

vector

Index of a data type work vector, where the index is one of 0, 1, 2, ... ssGetNumDWork(S)-1.

Returns

A pointer (void *) to the DWork vector specified by the index vector.

Description

Use to obtain a pointer to a particular DWork vector. See How to Use DWork Vectors for more information on DWork vectors.

    Note   Do not use any of the SimStruct functions that get information about DWork vector if your S-function does not contain any DWork vectors. Otherwise, your S-function produces errors during simulation.

Languages

C, C++

Example

See the S-function sfun_rtwdwork.csfun_rtwdwork.c used in sfcndemo_sfun_rtwdworksfcndemo_sfun_rtwdwork to learn how to use DWork vectors in an S-function.

Was this topic helpful?