OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm_statistics_impl.cpp File Reference

C API implementation — node, link, subcatchment statistics queries. More...

Include dependency graph for openswmm_statistics_impl.cpp:

Functions

SWMM_ENGINE_API int swmm_stat_node_max_depth (SWMM_Engine engine, int idx, double *val)
 Read maximum recorded water depth for one node.
 
SWMM_ENGINE_API int swmm_stat_node_max_overflow (SWMM_Engine engine, int idx, double *val)
 Read maximum recorded overflow discharge for one node.
 
SWMM_ENGINE_API int swmm_stat_node_vol_flooded (SWMM_Engine engine, int idx, double *val)
 Read cumulative flooded water volume for one node.
 
SWMM_ENGINE_API int swmm_stat_node_time_flooded (SWMM_Engine engine, int idx, double *val)
 Read cumulative flooding duration for one node.
 
SWMM_ENGINE_API int swmm_stat_link_max_flow (SWMM_Engine engine, int idx, double *val)
 Read maximum recorded absolute flow for one link.
 
SWMM_ENGINE_API int swmm_stat_link_max_velocity (SWMM_Engine engine, int idx, double *val)
 Read maximum recorded absolute flow velocity for one link.
 
SWMM_ENGINE_API int swmm_stat_link_max_filling (SWMM_Engine engine, int idx, double *val)
 Read maximum recorded depth/full-depth ratio for one link.
 
SWMM_ENGINE_API int swmm_stat_link_vol_flow (SWMM_Engine engine, int idx, double *val)
 Read cumulative conveyed water volume for one link.
 
SWMM_ENGINE_API int swmm_stat_link_surcharge_time (SWMM_Engine engine, int idx, double *val)
 Read cumulative surcharged duration for one link.
 
SWMM_ENGINE_API int swmm_stat_subcatch_precip (SWMM_Engine engine, int idx, double *val)
 Read cumulative precipitation volume for one subcatchment.
 
SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol (SWMM_Engine engine, int idx, double *val)
 Read cumulative runoff volume for one subcatchment.
 
SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff (SWMM_Engine engine, int idx, double *val)
 Read maximum recorded runoff discharge for one subcatchment.
 
SWMM_ENGINE_API int swmm_stat_node_max_depth_bulk (SWMM_Engine engine, double *buf, int count)
 Copy maximum recorded water depth for a prefix of the node table.
 
SWMM_ENGINE_API int swmm_stat_link_max_flow_bulk (SWMM_Engine engine, double *buf, int count)
 Copy maximum recorded absolute flow for a prefix of the link table.
 
SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol_bulk (SWMM_Engine engine, double *buf, int count)
 Copy cumulative runoff volume for a prefix of the subcatchment table.
 
SWMM_ENGINE_API int swmm_stat_node_max_overflow_bulk (SWMM_Engine engine, double *buf, int count)
 Copy maximum recorded overflow discharge for a prefix of the node table.
 
SWMM_ENGINE_API int swmm_stat_node_vol_flooded_bulk (SWMM_Engine engine, double *buf, int count)
 Copy cumulative flooded water volume for a prefix of the node table.
 
SWMM_ENGINE_API int swmm_stat_node_time_flooded_bulk (SWMM_Engine engine, double *buf, int count)
 Copy cumulative flooding duration for a prefix of the node table.
 
SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff_bulk (SWMM_Engine engine, double *buf, int count)
 Copy maximum recorded runoff discharge for a prefix of the subcatchment table.
 
SWMM_ENGINE_API int swmm_stat_link_max_velocity_bulk (SWMM_Engine engine, double *buf, int count)
 Copy maximum recorded absolute flow velocity for a prefix of the link table.
 
SWMM_ENGINE_API int swmm_stat_link_max_filling_bulk (SWMM_Engine engine, double *buf, int count)
 Copy maximum recorded depth/full-depth ratio for a prefix of the link table.
 
SWMM_ENGINE_API int swmm_stat_link_vol_flow_bulk (SWMM_Engine engine, double *buf, int count)
 Copy cumulative conveyed water volume for a prefix of the link table.
 
SWMM_ENGINE_API int swmm_stat_link_surcharge_time_bulk (SWMM_Engine engine, double *buf, int count)
 Copy cumulative surcharged duration for a prefix of the link table.
 

Detailed Description

C API implementation — node, link, subcatchment statistics queries.

See also
include/openswmm/engine/openswmm_statistics.h
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0

Function Documentation

◆ swmm_stat_link_max_filling()

SWMM_ENGINE_API int swmm_stat_link_max_filling ( SWMM_Engine engine,
int idx,
double * val )

Read maximum recorded depth/full-depth ratio for one link.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based link index in the current model.
[out]valOptional destination in dimensionless. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_link_max_filling_bulk()

SWMM_ENGINE_API int swmm_stat_link_max_filling_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy maximum recorded depth/full-depth ratio for a prefix of the link table.

Uses the same raw internal units and object order as swmm_stat_link_max_filling(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in dimensionless; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_link_max_flow()

SWMM_ENGINE_API int swmm_stat_link_max_flow ( SWMM_Engine engine,
int idx,
double * val )

Read maximum recorded absolute flow for one link.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based link index in the current model.
[out]valOptional destination in ft3/s. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_link_max_flow_bulk()

SWMM_ENGINE_API int swmm_stat_link_max_flow_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy maximum recorded absolute flow for a prefix of the link table.

Uses the same raw internal units and object order as swmm_stat_link_max_flow(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3/s; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_link_max_velocity()

SWMM_ENGINE_API int swmm_stat_link_max_velocity ( SWMM_Engine engine,
int idx,
double * val )

Read maximum recorded absolute flow velocity for one link.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based link index in the current model.
[out]valOptional destination in ft/s. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_link_max_velocity_bulk()

SWMM_ENGINE_API int swmm_stat_link_max_velocity_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy maximum recorded absolute flow velocity for a prefix of the link table.

Uses the same raw internal units and object order as swmm_stat_link_max_velocity(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft/s; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_link_surcharge_time()

SWMM_ENGINE_API int swmm_stat_link_surcharge_time ( SWMM_Engine engine,
int idx,
double * val )

Read cumulative surcharged duration for one link.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based link index in the current model.
[out]valOptional destination in s. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_link_surcharge_time_bulk()

SWMM_ENGINE_API int swmm_stat_link_surcharge_time_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy cumulative surcharged duration for a prefix of the link table.

Uses the same raw internal units and object order as swmm_stat_link_surcharge_time(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in s; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_link_vol_flow()

SWMM_ENGINE_API int swmm_stat_link_vol_flow ( SWMM_Engine engine,
int idx,
double * val )

Read cumulative conveyed water volume for one link.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based link index in the current model.
[out]valOptional destination in ft3. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_link_vol_flow_bulk()

SWMM_ENGINE_API int swmm_stat_link_vol_flow_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy cumulative conveyed water volume for a prefix of the link table.

Uses the same raw internal units and object order as swmm_stat_link_vol_flow(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_node_max_depth()

SWMM_ENGINE_API int swmm_stat_node_max_depth ( SWMM_Engine engine,
int idx,
double * val )

Read maximum recorded water depth for one node.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based node index in the current model.
[out]valOptional destination in ft. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_node_max_depth_bulk()

SWMM_ENGINE_API int swmm_stat_node_max_depth_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy maximum recorded water depth for a prefix of the node table.

Uses the same raw internal units and object order as swmm_stat_node_max_depth(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_node_max_overflow()

SWMM_ENGINE_API int swmm_stat_node_max_overflow ( SWMM_Engine engine,
int idx,
double * val )

Read maximum recorded overflow discharge for one node.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based node index in the current model.
[out]valOptional destination in ft3/s. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_node_max_overflow_bulk()

SWMM_ENGINE_API int swmm_stat_node_max_overflow_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy maximum recorded overflow discharge for a prefix of the node table.

Uses the same raw internal units and object order as swmm_stat_node_max_overflow(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3/s; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_node_time_flooded()

SWMM_ENGINE_API int swmm_stat_node_time_flooded ( SWMM_Engine engine,
int idx,
double * val )

Read cumulative flooding duration for one node.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based node index in the current model.
[out]valOptional destination in s. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_node_time_flooded_bulk()

SWMM_ENGINE_API int swmm_stat_node_time_flooded_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy cumulative flooding duration for a prefix of the node table.

Uses the same raw internal units and object order as swmm_stat_node_time_flooded(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in s; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_node_vol_flooded()

SWMM_ENGINE_API int swmm_stat_node_vol_flooded ( SWMM_Engine engine,
int idx,
double * val )

Read cumulative flooded water volume for one node.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based node index in the current model.
[out]valOptional destination in ft3. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_node_vol_flooded_bulk()

SWMM_ENGINE_API int swmm_stat_node_vol_flooded_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy cumulative flooded water volume for a prefix of the node table.

Uses the same raw internal units and object order as swmm_stat_node_vol_flooded(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_subcatch_max_runoff()

SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff ( SWMM_Engine engine,
int idx,
double * val )

Read maximum recorded runoff discharge for one subcatchment.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based subcatchment index in the current model.
[out]valOptional destination in ft3/s. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_subcatch_max_runoff_bulk()

SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy maximum recorded runoff discharge for a prefix of the subcatchment table.

Uses the same raw internal units and object order as swmm_stat_subcatch_max_runoff(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3/s; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.

◆ swmm_stat_subcatch_precip()

SWMM_ENGINE_API int swmm_stat_subcatch_precip ( SWMM_Engine engine,
int idx,
double * val )

Read cumulative precipitation volume for one subcatchment.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based subcatchment index in the current model.
[out]valOptional destination in ft3. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_subcatch_runoff_vol()

SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol ( SWMM_Engine engine,
int idx,
double * val )

Read cumulative runoff volume for one subcatchment.

Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[in]idxZero-based subcatchment index in the current model.
[out]valOptional destination in ft3. Values are copied from internal statistics without project display-unit conversion.
Returns
SWMM_OK, including NULL val; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADINDEX for invalid idx.

◆ swmm_stat_subcatch_runoff_vol_bulk()

SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol_bulk ( SWMM_Engine engine,
double * buf,
int count )

Copy cumulative runoff volume for a prefix of the subcatchment table.

Uses the same raw internal units and object order as swmm_stat_subcatch_runoff_vol(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.

Parameters
[in]engineNon-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation.
[out]bufNon-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3; entries beyond that prefix are unchanged.
[in]countPositive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count.
Returns
SWMM_OK even for a partial prefix; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/count<=0.