libpldm : add encode/decode APIs for SetStateEffecterStates

This commit implements the encode request and decode
response APIs for the SetStateEffecterStates command.
This enables BMC requester apps to send this command and
process the received response.

Change-Id: I1436c8730553b5a1aed8cda1fa90b8742e5be228
Signed-off-by: vkaverap <vkaverap@in.ibm.com>
diff --git a/libpldm/platform.h b/libpldm/platform.h
index 7741863..42169db 100644
--- a/libpldm/platform.h
+++ b/libpldm/platform.h
@@ -71,6 +71,40 @@
 					 uint8_t *comp_effecter_count,
 					 set_effecter_state_field *field);
 
+/** @brief Create a PLDM request message for SetStateEffecterStates
+ *
+ *  @param[in] instance_id - Message's instance id
+ *  @param[in] effecter_id - used to identify and access the effecter
+ *  @param[in] comp_effecter_count - number of individual sets of effecter
+ *         information. Upto eight sets of state effecter info can be accessed
+ *         for a given effecter.
+ *  @param[in] field - each unit is an instance of the stateField structure
+ *         that is used to set the requested state for a particular effecter
+ *         within the state effecter. This field holds the starting address of
+ *         the stateField values. The user is responsible to allocate the
+ *         memory prior to calling this command. The user has to allocate the
+ *         field parameter as sizeof(set_effecter_state_field) *
+ *         comp_effecter_count
+ *  @param[out] msg - Message will be written to this
+ *  @return pldm_completion_codes
+ *  @note  Caller is responsible for memory alloc and dealloc of param
+ *         'msg.body.payload'
+ */
+
+int encode_set_state_effecter_states_req(uint8_t instance_id,
+					 uint16_t effecter_id,
+					 uint8_t comp_effecter_count,
+					 set_effecter_state_field *field,
+					 struct pldm_msg *msg);
+
+/** @brief Decode SetStateEffecterStates response data
+ *  @param[in] msg - Request message payload
+ *  @param[out] completion_code - PLDM completion code
+ *  @return pldm_completion_codes
+ */
+int decode_set_state_effecter_states_resp(const struct pldm_msg_payload *msg,
+					  uint8_t *completion_code);
+
 #ifdef __cplusplus
 }
 #endif