[#BloombergLP-ball-Context-setAttributes]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/Context.adoc[Context]::setAttributes
:relfileprefix: ../../../
:mrdocs:

Set the attributes of this context object if they represent a valid context&period;

== Synopsis

Declared in `&lt;ball&lowbar;context&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
setAttributes(
    xref:BloombergLP/ball/Transmission/Cause.adoc[Transmission::Cause] transmissionCause,
    int recordIndex,
    int sequenceLength);
----

== Description

Set the value of this context object to the specified `transmissionCause`, `recordIndex`, and `sequenceLength` values if `transmissionCause`, `recordIndex`, and `sequenceLength` represent a valid context&period; Return 0 on success, and a non&hyphen;zero value (with no effect on this context object) otherwise&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *transmissionCause*
| cause of transmission
| *recordIndex*
| index within the sequence
| *sequenceLength*
| number of records in the sequence
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
