Casting into an enum

In reply to silverace99:

Seems like a type mismatch issue. Are you sure that the port types (initiator/target) are correct everywhere? What error does “cmd.op = operation_t’(op);” give?