# NMS_V5SendSA7Bit

Sets the value of the SA7 E1 framing bit to 0 or 1 for an E1 link on a provisioned interface.

#### Prototype

NMS_V5_RESULT_T NMS_V5SendSA7Bit ( NMS_V5_INTERFACE_ID_T interfaceId, NMS_V5_E1_LOCATION_T *e1_loc, NMS_V5_SA7_VALUE_T sa7_value)

Argument | Description
interfaceId | Interface ID of a provisioned interface.
e1_loc | Pointer to the E1 link location specified in the following structure: typedef union _NMS_V5_E1_LOCATION_T { struct { DWORD boardNb; DWORD trunkNb; } CG; }NMS_V5_E1_LOCATION_T See the Details section for field descriptions.
sa7_value | SA7 bit value to set (Boolean). Accepted values are 0 or 1.

#### Return values

Return value | Description
NMSV5_SUCCESS |
NMSV5_INTERNAL_FAILURE | Internal failure. Refer to the trace log for more information.
NMSV5_INVALID_E1 | Specified E1 link is not provisioned on this interface.
NMSV5_INVALID_INTERFACE_ID | Specified interface is not provisioned.
NMSV5_NOT_INITIALIZED | NMS V5 library was not initialized with NMS_V5Initialize.

#### Details

NMS_V5SendSA7Bit is asynchronous and returns when the SA7 bit is set for the specified E1 link. Applications can only call NMS_V5SendSA7Bit for E1 links that are provisioned on the active interface variant.

The NMS_V5_E1_LOCATION_T structure includes the following fields:

Field | Description
boardNb | Logical board number where an E1 link is located (as defined by NMS OAM).
trunkNb | Logical trunk number associated with the E1 link (as defined by NMS OAM).

#### See also

NMS_V5ProvisionInterface

#### Example

void SendSA7Bit( void )
{
NMS_V5_RESULT_T NmsResult;
DWORD InterfaceId;
NMS_V5_E1_LOCATION_T E1Location;
BOOL SA7Value;
printf("NMS_V5SendSA7Bit:\n");
/* Get parameters */
promptdw_nodft("Enter InterfaceId", &InterfaceId);
printf("Enter E1 location:\n");
GetE1LocationNMS( &E1Location );
promptdw_nodft("Enter SA7 Value (0 or 1))", &SA7Value);
NmsResult = NMS_V5SendSA7Bit( InterfaceId, E1Location, SA7Value );
printf ("NMS_V5SendSA7Bit: Result=%s\n",PRINT_RESULT(NmsResult));
}