import Foundation

struct MVitaPtpMessageOutSendResult:MVitaPtpMessageOutProtocol
{
    let data:Data
    
    init(
        event:MVitaPtpMessageInEvent,
        result:MVitaPtpResult,
        parameters:[UInt32])
    {
        let builder:MVitaPtpMessageOutBuilder = MVitaPtpMessageOutBuilder()
        builder.append(value:MVitaPtpType.command.rawValue)
        builder.append(value:MVitaPtpDataPhase.none.rawValue)
        builder.append(value:MVitaPtpCommand.sendResult.rawValue)
        builder.appendTransactionId()
        builder.append(value:event.eventId)
        builder.append(value:result.rawValue)
        
        for parameter:UInt32 in parameters
        {
            builder.append(value:parameter)
        }
        
        data = builder.export()
    }
}

import Foundation

struct MVitaPtpMessageOutSendResult:MVitaPtpMessageOutProtocol
{
    let data:Data
    
    init(
        event:MVitaPtpMessageInEvent,
        result:MVitaPtpResult)
    {
        let builder:MVitaPtpMessageOutBuilder = MVitaPtpMessageOutBuilder()
        builder.append(value:MVitaPtpType.command.rawValue)
        builder.append(value:MVitaPtpDataPhase.none.rawValue)
        builder.append(value:MVitaPtpCommand.sendResult.rawValue)
        builder.appendTransactionId()
        builder.append(value:event.eventId)
        builder.append(value:result.rawValue)
        
        data = builder.export()
    }
}

--- 
+++ 
@@ -6,7 +6,8 @@
     
     init(
         event:MVitaPtpMessageInEvent,
-        result:MVitaPtpResult)
+        result:MVitaPtpResult,
+        parameters:[UInt32])
     {
         let builder:MVitaPtpMessageOutBuilder = MVitaPtpMessageOutBuilder()
         builder.append(value:MVitaPtpType.command.rawValue)
@@ -16,6 +17,11 @@
         builder.append(value:event.eventId)
         builder.append(value:result.rawValue)
         
+        for parameter:UInt32 in parameters
+        {
+            builder.append(value:parameter)
+        }
+        
         data = builder.export()
     }
 }
Update send result with parameters
