namespace PlcSiemens.Protocol.Common
{
    public enum PduFuncType
    {
        // PDU Functions
        PduResponse = 0x02,   // Response (when error)

        PduFuncRead = 0x04,   // Read area
        PduFuncWrite = 0x05,   // Write area
        PduNegotiate = 0xF0,   // Negotiate PDU length
        PduStart = 0x28,   // CPU start
        PduStop = 0x29,   // CPU stop
        PduStartUpload = 0x1D,   // Start Upload
        PduUpload = 0x1E,   // Upload
        PduEndUpload = 0x1F,   // EndUpload
        PduReqDownload = 0x1A,   // Start Download request
        PduDownload = 0x1B,   // Download request
        PduDownloadEnded = 0x1C,   // Download end request
        PduControl = 0x28,   // Control (insert/delete..)

        // PDU SubFunctions
        SFunListAll = 0x01,   // List all blocks

        SFunListBoT = 0x02,   // List Blocks of type
        SFunBlkInfo = 0x03,   // Get Block info
        SFunReadSzl = 0x01,   // Read SZL
        SFunReadClock = 0x01,   // Read Clock (Date and Time)
        SFunSetClock = 0x02,   // Set Clock (Date and Time)
        SFunEnterPwd = 0x01,   // Enter password    for this session
        SFunCancelPwd = 0x02,   // Cancel password    for this session
        SFunInsert = 0x50,   // Insert block
        SFunDelete = 0x42,   // Delete block
    }
}
