Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 5.1.0 - Segregating interfaces to each functionality #97

Merged
merged 31 commits into from
Jan 12, 2023

Conversation

Rickedb
Copy link
Owner

@Rickedb Rickedb commented Jan 12, 2023

Changes

The main purpose of this version is to make it easier to know how does Mid replies work and make easier to use too.

Improvements

  • Interface segregation to represent types of mid:
    • IAcknowledge
    • IAcknowledgeable<TAckMid>
    • IAnswerableBy<TAnswerMid>
    • IAcceptableCommand
    • IDeclinableCommand
    • ISubscription
    • IUnsubscription

New Features

  • Along with interfaces, added easy-use extensions:
    • GetAcknowledge<TAckMid>() to get the acknowledge for the mid instance instead of finding yourself which is the ack mid
    • GetReply<TAnswerMid>() to generate the respective reply mid of the instance instead of finding yourself which one is the reply mid. (for replies that have additional params, a raw instance will be generate with the same revision but you'll have too set other parameters by yourself)
    • GetReply<TAnswerMid>(int revision) same as above, however you can inform the informed revision
    • GetAcceptCommand<TAcceptedMid> generate Mid0005 to the accepted mid
    • GetDeclinedCommand<TAcceptedMid> generate Mid0004 to the declined mid with informed error
    • AssertAndGetDeclineCommand<TDeclinedMid> same as above, however it ensures it's a documented error that you informed, if not, an ArgumentException is thrown
  • Added new Errors:
    • WRONG_TOOL_TYPE_TO_PSET_DOWNLOAD_CONNECTED => 26
    • TOOL_IS_INACCESSIBLE => 27
    • JOB_ABORTION_IS_IN_PROGRESS => 28,
    • TOOL_DOES_NOT_EXIST => 29
    • OTHER_MASTER_CLIENT_ALREADY_CONNECTED => 35
    • LOCK_TYPE_NOT_SUPPORTED => 36
    • PAIRING_FAILED => 61
    • PAIRING_DENIED => 62
    • PAIRING_OR_PAIRING_ABORTION_ATTEMPT_ON_WRONG_TOOLTYPE => 63
    • PAIRING_ABORTION_DENIED => 64
    • PAIRING_ABORTION_FAILED => 65
    • PAIRING_DISCONNECTION_FAILED => 66
    • PAIRING_IN_PROGRESS_OR_ALREADY_DONE => 67
    • PAIRING_DENIED_NO_PROGRAM_CONTROL => 68
    • UNSUPPORTED_EXTRA_DATA_REVISION => 69
    • SUBSCRIBED_MID_UNSUPPORTED => 73
    • SUBSCRIBED_MID_REVISION_UNSUPPORTED => 74
    • REQUESTED_MID_UNSUPPORTED => 75
    • REQUESTED_MID_REVISION_UNSUPPORTED => 76
    • REQUESTED_ON_SPECIFIC_DATA_NOT_SUPPORTED => 77
    • SUBSCRIPTION_ON_SPECIFIC_DATA_NOT_SUPPORTED => 78
    • AUDI_EMERGENCY_STATUS_SUBSCRIPTION_EXISTS => 80
    • AUDI_EMERGENCY_STATUS_SUBSCRIPTION_DOESNT_EXISTS => 81

@Rickedb Rickedb merged commit 0498a46 into master Jan 12, 2023
@Rickedb Rickedb deleted the improvement/interface-segregation branch January 12, 2023 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant