-- *****************************************************************
-- FS-TIME-MIB.mib:  FS Time MIB file
--
-- March 2002, Wuzg
--
-- Copyright (c) 2002 by FS.COM Inc..
-- All rights reserved.
-- 
-- *****************************************************************
--

FS-TIME-MIB DEFINITIONS ::= BEGIN

IMPORTS
        MODULE-IDENTITY,
        OBJECT-TYPE,
        Integer32
                FROM SNMPv2-SMI
        DisplayString,
        RowStatus,
        DateAndTime
                FROM SNMPv2-TC
        MODULE-COMPLIANCE,
        OBJECT-GROUP
                FROM SNMPv2-CONF
        fsMgmt
                FROM FS-SMI;

fsTimeMIB MODULE-IDENTITY
        LAST-UPDATED "200203200000Z"
        ORGANIZATION "FS.COM Inc.."
        CONTACT-INFO
                " 
                Tel: 400-865-2852 

                E-mail: https://www.fs.com/live_chat_service_mail.html"
        DESCRIPTION
                "This module defines fs time mibs."
        REVISION      "200203200000Z"
        DESCRIPTION
                "Initial version of this MIB module."
        ::= { fsMgmt 15}

fsTimeMIBObjects OBJECT IDENTIFIER ::= { fsTimeMIB 1 }

fsClockDateAndTime OBJECT-TYPE
    SYNTAX      DateAndTime
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The current local date and time for the system.

        Setting this object is equivalent to setting an automated
        clock and calendar.  The value of the object will track the
        date and time from the value set.  Note that due to hardware
        limitations some systems may not be able to preserve such
        meaning across reboots of the system, as indicated by
        csyClockLostOnReboot.

        A constant value of all zeros and length 8 indicates the
        system is not aware of the present date and time."
    ::= { fsTimeMIBObjects 1 }

fsClockWeek OBJECT-TYPE
    SYNTAX      INTEGER(1..7)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This value indicate that which day currunt time of system indicate. e.g. 
         1 indicate Monday7 indicate Sunday"
    ::= { fsTimeMIBObjects 2 }    
    

fsTimeRangeMIBObjects OBJECT IDENTIFIER ::= { fsTimeMIB 2}

--
-- Time/scheduling range filter table
--

fsTimeRangeTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF FSTimeRangeEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Defines a table of filters which can be used to effectively
         enable or disable policies based on a valid time range."
    ::= { fsTimeRangeMIBObjects 1}

fsTimeRangeEntry OBJECT-TYPE
    SYNTAX      FSTimeRangeEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A row describing a given time range for which a policy may be
         filtered on to place the rule active or inactive."
    INDEX   { fsTimeRangeName }
    ::= { fsTimeRangeTable 1 }

FSTimeRangeEntry ::= SEQUENCE {
    fsTimeRangeName                 DisplayString,
    fsTimeRangePeriodFS          DateAndTime,
    fsTimeRangePeriodEnd            DateAndTime,
    fsTimeRangeRowStatus            RowStatus
}

fsTimeRangeName OBJECT-TYPE
    SYNTAX      DisplayString(SIZE (1..32))
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An administratively assigned name for this time range.
         This value is unique for every entry
         When this string be used as an index,Value of a sub-identifier equal 
         ASCII value of corresponding character(first sub-identifier corresponds
         first character of string). The number of sub-identifiers of this string
         must be 32,If length of string is less than 32 the sub-identifier(0x0) 
         will be filled in tail."
    ::= { fsTimeRangeEntry 1 }


fsTimeRangePeriodFS OBJECT-TYPE
    SYNTAX      DateAndTime
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The fsing time period for this filter.  In addition to a
         normal DateAndTime string, this object may be set to the
         OCTET STRING value THISANDPRIOR which indicates that the
         filter is valid from any time before now up until (at least)
         now."
    DEFVAL { '0000010100000000'H }
    ::= { fsTimeRangeEntry 2 }

fsTimeRangePeriodEnd OBJECT-TYPE
    SYNTAX      DateAndTime
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The ending time period for this filter.  In addition to a
         normal DateAndTime string, this object may be set to the
         OCTET STRING value THISANDFUTURE which indicates that the
         filter is valid without an ending date and/or time."
    DEFVAL { '9999123123595909'H }
    ::= { fsTimeRangeEntry 3 }

fsTimeRangeRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object indicates the conceptual status of this row."
    ::= { fsTimeRangeEntry 4 }


--
-- Time range periodic filter table
--

fsTimeRangePeriodicTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF FSTimeRangePeriodicEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Defines a table of periodic time filters in the time-range."
    ::= { fsTimeRangeMIBObjects 2 }

fsTimeRangePeriodicEntry OBJECT-TYPE
    SYNTAX      FSTimeRangePeriodicEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A row describing a given periodic time limit for the time-range."
    INDEX   { fsTimeRangePeriodicTRName }
    ::= { fsTimeRangePeriodicTable 1 }

FSTimeRangePeriodicEntry ::= SEQUENCE {
    fsTimeRangePeriodicTRName               DisplayString,
    fsTimeRangePeriodicIndex                Integer32,
    fsTimeRangePeriodicType                 INTEGER, 
    fsTimeRangePeriodicFSWeekDay            OCTET STRING,
    fsTimeRangePeriodicEndWeekDay           INTEGER,
    fsTimeRangePeriodicTimeOfDayFS          DateAndTime,
    fsTimeRangePeriodicTimeOfDayEnd         DateAndTime,
    fsTimeRangePeriodicRowStatus            RowStatus
}

fsTimeRangePeriodicTRName OBJECT-TYPE
    SYNTAX      DisplayString (SIZE(1..32))
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Time-range name which this periodic time filter belong to.
         This value is unique for every entry
         When this string be used as an index,Value of a sub-identifier equal 
         ASCII value of corresponding character(first sub-identifier corresponds
         first character of string). The number of sub-identifiers of this string
         must be 32,If length of string is less than 32 the sub-identifier(0x0) 
         will be filled in tail."
    ::= { fsTimeRangePeriodicEntry 1 }

fsTimeRangePeriodicIndex OBJECT-TYPE
        SYNTAX Integer32(1..65535)
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
               "Object which specifies a unique entry in the fsTimeRangePeriodicTable. 
                A management station wishing to initiate a entry operation should use a
                pseudo-random value for this object when creating
                or modifying an instance of a entry.
                
                The RowStatus semantics of the entry object will prevent access conflicts."
        ::= { fsTimeRangePeriodicEntry 2 }
        
fsTimeRangePeriodicType OBJECT-TYPE
        SYNTAX INTEGER{
              fixed-segment(1),   -- Fixed time period, defined by the entry, which is in one or several days. 
              unfixed-segment(2)  -- Unfixed time period, defined by the entry, which is one or several days in a week. 
        }
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
               "Type defined by the time period in the entry." 
        ::= { fsTimeRangePeriodicEntry 3 }        

fsTimeRangePeriodicFSWeekDay OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
         "The start day in a week of the time period. Every bit in this byte stands for one day in 
          a week. The lowest bit(the 1st bit from the right) stands for monday. One by one to the left 
          Tuesday, wednesday,thursday, friday,saturday, sunday are. The highest bit(the 1st bit from the left)
          always be 0. 1 means the day represented by the bit is included."
    DEFVAL {'fe'H}
    ::= { fsTimeRangePeriodicEntry 4 }

fsTimeRangePeriodicEndWeekDay OBJECT-TYPE
    SYNTAX      INTEGER{
                       monday(1), tuesday(2), wednesday(3),
                       thursday(4), friday(5), saturday(6),
                       sunday(7)                            
                }
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The end day in a week of the time period. When fsTimeRangePeriodicType is 'fixed-segment',
         this field is insignificant."
    ::= { fsTimeRangePeriodicEntry 5 }
    
fsTimeRangePeriodicTimeOfDayFS OBJECT-TYPE
    SYNTAX      DateAndTime
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The start time of the time period. In fact, only time in DateAndTime is meaningful."
    ::= { fsTimeRangePeriodicEntry 6 }

fsTimeRangePeriodicTimeOfDayEnd OBJECT-TYPE
    SYNTAX      DateAndTime
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The end time of the time period. In fact, only time in DateAndTime is meaningful."
     ::= { fsTimeRangePeriodicEntry 7 }

fsTimeRangePeriodicRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object indicates the conceptual status of this row"
    ::= { fsTimeRangePeriodicEntry 8 }

fsTimeMIBConformance OBJECT IDENTIFIER ::= { fsTimeMIB 3 }
fsTimeMIBCompliances OBJECT IDENTIFIER ::= { fsTimeMIBConformance 1 }
fsTimeMIBGroups      OBJECT IDENTIFIER ::= { fsTimeMIBConformance 2 }


-- compliance statements

fsTimeMIBCompliance MODULE-COMPLIANCE
        STATUS  current
        DESCRIPTION
                "The compliance statement for entities which implement
                the FS Time MIB"
        MODULE  -- this module
                GROUP fsTimeMIBGroup
                DESCRIPTION
                  "This group is mandatory for device which support RTC."                  
                GROUP fsTimeRangeMIBGroup
                DESCRIPTION
                  "This group is mandatory for device which support RTC or NTP/SNTP."                
                
        ::= { fsTimeMIBCompliances 1 }
                
-- units of conformance

fsTimeMIBGroup OBJECT-GROUP
        OBJECTS {
               fsClockDateAndTime, 
               fsClockWeek
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing time information."
        ::= { fsTimeMIBGroups 1 } 
        
fsTimeRangeMIBGroup OBJECT-GROUP
        OBJECTS {
          fsTimeRangePeriodicIndex          ,
          fsTimeRangePeriodicType           ,
          fsTimeRangePeriodicFSWeekDay   ,
          fsTimeRangePeriodicEndWeekDay     ,
          fsTimeRangePeriodicTimeOfDayFS ,
          fsTimeRangePeriodicTimeOfDayEnd   ,
          fsTimeRangePeriodicRowStatus       
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing time-range function."
        ::= { fsTimeMIBGroups 2 }        
  
END
