text:
namespace Kvasir {
//None
    namespace Pbcfg0Control0{    ///<Global Port Control 0
        using Addr = Register::Address<0x4002a000,0x60ff4040,0x00000000,unsigned>;
        ///External Interrupt 0 Pin Selection.
        enum class Int0selVal {
            int00=0x00000000,     ///<Select INT0.0 (PB3.0)
            int01=0x00000001,     ///<Select INT0.1 (PB3.1)
            int02=0x00000002,     ///<Select INT0.2 (PB3.2)
            int03=0x00000003,     ///<Select INT0.3 (PB3.3)
            int04=0x00000004,     ///<Select INT0.4 (RESERVED)
            int05=0x00000005,     ///<Select INT0.5 (RESERVED)
            int06=0x00000006,     ///<Select INT0.6 (RESERVED)
            int07=0x00000007,     ///<Select INT0.7 (RESERVED)
            int08=0x00000008,     ///<Select INT0.8 (RESERVED)
            int09=0x00000009,     ///<Select INT0.9 (RESERVED)
            int010=0x0000000a,     ///<Select INT0.10 (RESERVED)
            int011=0x0000000b,     ///<Select INT0.11 (RESERVED)
            int012=0x0000000c,     ///<Select INT0.12 (RESERVED)
            int013=0x0000000d,     ///<Select INT0.13 (RESERVED)
            int014=0x0000000e,     ///<Select INT0.14 (RESERVED)
            int015=0x0000000f,     ///<Select INT0.15 (RESERVED)
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,0),Register::ReadWriteAccess,Int0selVal> int0sel{};
        namespace Int0selValC{
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int00> int00{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int01> int01{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int02> int02{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int03> int03{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int04> int04{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int05> int05{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int06> int06{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int07> int07{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int08> int08{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int09> int09{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int010> int010{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int011> int011{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int012> int012{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int013> int013{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int014> int014{};
            constexpr Register::FieldValue<decltype(int0sel)::Type,Int0selVal::int015> int015{};
        }
        ///External Interrupt 0 Polarity.
        enum class Int0polVal {
            low=0x00000000,     ///<A low value or falling edge on the selected pin will cause interrupt.
            high=0x00000001,     ///<A high value or rising edge on the selected pin will cause interrupt.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::ReadWriteAccess,Int0polVal> int0pol{};
        namespace Int0polValC{
            constexpr Register::FieldValue<decltype(int0pol)::Type,Int0polVal::low> low{};
            constexpr Register::FieldValue<decltype(int0pol)::Type,Int0polVal::high> high{};
        }
        ///External Interrupt 0 Mode.
        enum class Int0mdVal {
            level=0x00000000,     ///<Interrupt based on level sensitivity.
            edge=0x00000001,     ///<Interrupt based on edge sensitivity.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::ReadWriteAccess,Int0mdVal> int0md{};
        namespace Int0mdValC{
            constexpr Register::FieldValue<decltype(int0md)::Type,Int0mdVal::level> level{};
            constexpr Register::FieldValue<decltype(int0md)::Type,Int0mdVal::edge> edge{};
        }
        ///External Interrupt 0 Enable.
        enum class Int0enVal {
            disabled=0x00000000,     ///<Disable external interrupt 0.
            enabled=0x00000001,     ///<Enable external interrupt 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,Int0enVal> int0en{};
        namespace Int0enValC{
            constexpr Register::FieldValue<decltype(int0en)::Type,Int0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(int0en)::Type,Int0enVal::enabled> enabled{};
        }
        ///External Interrupt 1 Pin Selection.
        enum class Int1selVal {
            int10=0x00000000,     ///<Select INT1.0 (PB3.0)
            int11=0x00000001,     ///<Select INT1.1 (PB3.1)
            int12=0x00000002,     ///<Select INT1.2 (PB3.2)
            int13=0x00000003,     ///<Select INT1.3 (PB3.3)
            int14=0x00000004,     ///<Select INT1.4 (RESERVED)
            int15=0x00000005,     ///<Select INT1.5 (RESERVED)
            int16=0x00000006,     ///<Select INT1.6 (RESERVED)
            int17=0x00000007,     ///<Select INT1.7 (RESERVED)
            int18=0x00000008,     ///<Select INT1.8 (RESERVED)
            int19=0x00000009,     ///<Select INT1.9 (RESERVED)
            int110=0x0000000a,     ///<Select INT1.10 (RESERVED)
            int111=0x0000000b,     ///<Select INT1.11 (RESERVED)
            int112=0x0000000c,     ///<Select INT1.12 (RESERVED)
            int113=0x0000000d,     ///<Select INT1.13 (RESERVED)
            int114=0x0000000e,     ///<Select INT1.14 (RESERVED)
            int115=0x0000000f,     ///<Select INT1.15 (RESERVED)
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,8),Register::ReadWriteAccess,Int1selVal> int1sel{};
        namespace Int1selValC{
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int10> int10{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int11> int11{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int12> int12{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int13> int13{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int14> int14{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int15> int15{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int16> int16{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int17> int17{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int18> int18{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int19> int19{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int110> int110{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int111> int111{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int112> int112{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int113> int113{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int114> int114{};
            constexpr Register::FieldValue<decltype(int1sel)::Type,Int1selVal::int115> int115{};
        }
        ///External Interrupt 1 Polarity.
        enum class Int1polVal {
            low=0x00000000,     ///<A low value or falling edge on the selected pin will cause interrupt.
            high=0x00000001,     ///<A high value or rising edge on the selected pin will cause interrupt.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,12),Register::ReadWriteAccess,Int1polVal> int1pol{};
        namespace Int1polValC{
            constexpr Register::FieldValue<decltype(int1pol)::Type,Int1polVal::low> low{};
            constexpr Register::FieldValue<decltype(int1pol)::Type,Int1polVal::high> high{};
        }
        ///External Interrupt 1 Mode.
        enum class Int1mdVal {
            level=0x00000000,     ///<Interrupt based on level sensitivity.
            edge=0x00000001,     ///<Interrupt based on edge sensitivity.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,13),Register::ReadWriteAccess,Int1mdVal> int1md{};
        namespace Int1mdValC{
            constexpr Register::FieldValue<decltype(int1md)::Type,Int1mdVal::level> level{};
            constexpr Register::FieldValue<decltype(int1md)::Type,Int1mdVal::edge> edge{};
        }
        ///External Interrupt 1 Enable.
        enum class Int1enVal {
            disabled=0x00000000,     ///<Disable external interrupt 1.
            enabled=0x00000001,     ///<Enable external interrupt 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,15),Register::ReadWriteAccess,Int1enVal> int1en{};
        namespace Int1enValC{
            constexpr Register::FieldValue<decltype(int1en)::Type,Int1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(int1en)::Type,Int1enVal::enabled> enabled{};
        }
        ///Pulse Generator Timer.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(28,24),Register::ReadWriteAccess,unsigned> pgtimer{};
        ///Pulse Generator Timer Done Flag.
        enum class PgdonefVal {
            notSet=0x00000000,     ///<Firmware has written to the PBPGPHASE register, but the Pulse Generator timer has not expired.
            set=0x00000001,     ///<The Pulse Generator cycle finished since the last time PBPGPHASE was written.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,31),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,PgdonefVal> pgdonef{};
        namespace PgdonefValC{
            constexpr Register::FieldValue<decltype(pgdonef)::Type,PgdonefVal::notSet> notSet{};
            constexpr Register::FieldValue<decltype(pgdonef)::Type,PgdonefVal::set> set{};
        }
    }
    namespace Pbcfg0Control1{    ///<Global Port Control 1
        using Addr = Register::Address<0x4002a010,0x7f7c007c,0x00000000,unsigned>;
        ///JTAG Enable.
        enum class JtagenVal {
            disabled=0x00000000,     ///<JTAG functionality is not pinned out.
            enabled=0x00000001,     ///<JTAG functionality is pinned out.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,JtagenVal> jtagen{};
        namespace JtagenValC{
            constexpr Register::FieldValue<decltype(jtagen)::Type,JtagenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(jtagen)::Type,JtagenVal::enabled> enabled{};
        }
        ///ETM Enable.
        enum class EtmenVal {
            disabled=0x00000000,     ///<ETM not pinned out.
            enabled=0x00000001,     ///<ETM is enabled and pinned out.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,EtmenVal> etmen{};
        namespace EtmenValC{
            constexpr Register::FieldValue<decltype(etmen)::Type,EtmenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(etmen)::Type,EtmenVal::enabled> enabled{};
        }
        ///EMIF <overline>BE0</overline> Pin Enable.
        enum class Emifbe0benVal {
            disabled=0x00000000,     ///<Disable the EMIF /BE0 pin.
            enabled=0x00000001,     ///<Enable the /BE0 pin if EMIFEN is also set to 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,Emifbe0benVal> emifbe0ben{};
        namespace Emifbe0benValC{
            constexpr Register::FieldValue<decltype(emifbe0ben)::Type,Emifbe0benVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(emifbe0ben)::Type,Emifbe0benVal::enabled> enabled{};
        }
        ///EMIF CS1 Pin Enable.
        enum class Emifcs1enVal {
            disabled=0x00000000,     ///<Disable the EMIF CS1 pin.
            enabled=0x00000001,     ///<Enable the CS1 pin if EMIFEN is also set to 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,8),Register::ReadWriteAccess,Emifcs1enVal> emifcs1en{};
        namespace Emifcs1enValC{
            constexpr Register::FieldValue<decltype(emifcs1en)::Type,Emifcs1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(emifcs1en)::Type,Emifcs1enVal::enabled> enabled{};
        }
        ///EMIF Enable.
        enum class EmifenVal {
            disabled=0x00000000,     ///<Disable the EMIF pins.
            enabled=0x00000001,     ///<EMIF is enabled and pinned out.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,9),Register::ReadWriteAccess,EmifenVal> emifen{};
        namespace EmifenValC{
            constexpr Register::FieldValue<decltype(emifen)::Type,EmifenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(emifen)::Type,EmifenVal::enabled> enabled{};
        }
        ///EMIF Width.
        enum class EmifwidthVal {
            awidth8=0x00000000,     ///<EMIF Address[7:0]
            awidth9=0x00000001,     ///<EMIF Address[8:0], PB2.8 = A[8]
            awidth10=0x00000002,     ///<EMIF Address[9:0], PB2.7 = A[9]
            awidth11=0x00000003,     ///<EMIF Address[10:0], PB2.6 = A[10]
            awidth12=0x00000004,     ///<EMIF Address[11:0], PB2.5 = A[11]
            awidth13=0x00000005,     ///<EMIF Address[12:0], PB2.4 = A[12]
            awidth14=0x00000006,     ///<EMIF Address[13:0], PB2.3 = A[13]
            awidth15=0x00000007,     ///<EMIF Address[14:0], PB2.2 = A[14]
            awidth16=0x00000008,     ///<EMIF Address[15:0], PB2.1 = A[15]
            awidth17=0x00000009,     ///<EMIF Address[16:0], PB2.0 = A[16]
            awidth18=0x0000000a,     ///<EMIF Address[17:0], PB1.15 = A[17]
            awidth19=0x0000000b,     ///<EMIF Address[18:0], PB1.14 = A[18]
            awidth20=0x0000000c,     ///<EMIF Address[19:0], PB1.13 = A[19]
            awidth21=0x0000000d,     ///<EMIF Address[20:0], PB1.12 = A[20]
            awidth22=0x0000000e,     ///<EMIF Address[21:0], PB1.11 = A[21]
            awidth23=0x0000000f,     ///<EMIF Address[22:0], PB1.10 = A[22]
            awidth24=0x00000010,     ///<EMIF Address[23:0], PB1.10 = A[23]
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,10),Register::ReadWriteAccess,EmifwidthVal> emifwidth{};
        namespace EmifwidthValC{
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth8> awidth8{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth9> awidth9{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth10> awidth10{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth11> awidth11{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth12> awidth12{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth13> awidth13{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth14> awidth14{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth15> awidth15{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth16> awidth16{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth17> awidth17{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth18> awidth18{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth19> awidth19{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth20> awidth20{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth21> awidth21{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth22> awidth22{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth23> awidth23{};
            constexpr Register::FieldValue<decltype(emifwidth)::Type,EmifwidthVal::awidth24> awidth24{};
        }
        ///Match Mode.
        enum class MatmdVal {
            pinmatch=0x00000000,     ///<Port Match registers used to provide interrupt / wake sources.
            capsenseTx=0x00000001,     ///<Port Match registers used to monitor output pin activity for Capacitive Sensing measurements.
            capsenseRx=0x00000002,     ///<Port Match registers used to monitor input pin activity for Capacitive Sensing measurements.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,MatmdVal> matmd{};
        namespace MatmdValC{
            constexpr Register::FieldValue<decltype(matmd)::Type,MatmdVal::pinmatch> pinmatch{};
            constexpr Register::FieldValue<decltype(matmd)::Type,MatmdVal::capsenseTx> capsenseTx{};
            constexpr Register::FieldValue<decltype(matmd)::Type,MatmdVal::capsenseRx> capsenseRx{};
        }
        ///External Regulator Reset Mode.
        enum class EvregrmdVal {
            resetOnAny=0x00000000,     ///<The pins used by the external regulator will default to digital inputs with weak pull-up enabled on any reset.
            resetOnPor=0x00000001,     ///<The pins used by the external regulator will default to digital inputs with weak pull-up enabled only on Power-On Reset. Their configured mode will be preserved through all other resets.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(23,23),Register::ReadWriteAccess,EvregrmdVal> evregrmd{};
        namespace EvregrmdValC{
            constexpr Register::FieldValue<decltype(evregrmd)::Type,EvregrmdVal::resetOnAny> resetOnAny{};
            constexpr Register::FieldValue<decltype(evregrmd)::Type,EvregrmdVal::resetOnPor> resetOnPor{};
        }
        ///Port Bank Configuration Lock.
        enum class LockVal {
            unlocked=0x00000000,     ///<Port Bank Configuration and Control registers are unlocked.
            locked=0x00000001,     ///<The following registers are locked from write access: CONTROL1, XBAR0L, XBAR0H, XBAR1, and all PBSKIP registers.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,31),Register::ReadWriteAccess,LockVal> lock{};
        namespace LockValC{
            constexpr Register::FieldValue<decltype(lock)::Type,LockVal::unlocked> unlocked{};
            constexpr Register::FieldValue<decltype(lock)::Type,LockVal::locked> locked{};
        }
    }
    namespace Pbcfg0Xbar0l{    ///<Crossbar 0 Control (Low)
        using Addr = Register::Address<0x4002a020,0x80003800,0x00000000,unsigned>;
        ///USART0 Enable.
        enum class Usart0enVal {
            disabled=0x00000000,     ///<Disable USART0 RX and TX on Crossbar 0.
            enabled=0x00000001,     ///<Enable USART0 RX and TX on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,Usart0enVal> usart0en{};
        namespace Usart0enValC{
            constexpr Register::FieldValue<decltype(usart0en)::Type,Usart0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(usart0en)::Type,Usart0enVal::enabled> enabled{};
        }
        ///USART0 Flow Control Enable.
        enum class Usart0fcenVal {
            disabled=0x00000000,     ///<Disable USART0 flow control on Crossbar 0.
            enabled=0x00000001,     ///<Enable USART0 flow control on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,Usart0fcenVal> usart0fcen{};
        namespace Usart0fcenValC{
            constexpr Register::FieldValue<decltype(usart0fcen)::Type,Usart0fcenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(usart0fcen)::Type,Usart0fcenVal::enabled> enabled{};
        }
        ///USART0 Clock Signal Enable.
        enum class Usart0cenVal {
            disabled=0x00000000,     ///<Disable USART0 clock on Crossbar 0.
            enabled=0x00000001,     ///<Enable USART0 clock on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,Usart0cenVal> usart0cen{};
        namespace Usart0cenValC{
            constexpr Register::FieldValue<decltype(usart0cen)::Type,Usart0cenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(usart0cen)::Type,Usart0cenVal::enabled> enabled{};
        }
        ///SPI0 Enable.
        enum class Spi0enVal {
            disabled=0x00000000,     ///<Disable SPI0 SCK, MISO, and MOSI on Crossbar 0.
            enabled=0x00000001,     ///<Enable SPI0 SCK, MISO, and MOSI on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::ReadWriteAccess,Spi0enVal> spi0en{};
        namespace Spi0enValC{
            constexpr Register::FieldValue<decltype(spi0en)::Type,Spi0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi0en)::Type,Spi0enVal::enabled> enabled{};
        }
        ///SPI0 NSS Pin Enable.
        enum class Spi0nssenVal {
            disabled=0x00000000,     ///<Disable SPI0 NSS on Crossbar 0.
            enabled=0x00000001,     ///<Enable SPI0 NSS on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::ReadWriteAccess,Spi0nssenVal> spi0nssen{};
        namespace Spi0nssenValC{
            constexpr Register::FieldValue<decltype(spi0nssen)::Type,Spi0nssenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi0nssen)::Type,Spi0nssenVal::enabled> enabled{};
        }
        ///USART1 Enable.
        enum class Usart1enVal {
            disabled=0x00000000,     ///<Disable USART1 RX and TX on Crossbar 0.
            enabled=0x00000001,     ///<Enable USART1 RX and TX on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::ReadWriteAccess,Usart1enVal> usart1en{};
        namespace Usart1enValC{
            constexpr Register::FieldValue<decltype(usart1en)::Type,Usart1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(usart1en)::Type,Usart1enVal::enabled> enabled{};
        }
        ///USART1 Flow Control Enable.
        enum class Usart1fcenVal {
            disabled=0x00000000,     ///<Disable USART1 flow control on Crossbar 0.
            enabled=0x00000001,     ///<Enable USART1 flow control on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,6),Register::ReadWriteAccess,Usart1fcenVal> usart1fcen{};
        namespace Usart1fcenValC{
            constexpr Register::FieldValue<decltype(usart1fcen)::Type,Usart1fcenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(usart1fcen)::Type,Usart1fcenVal::enabled> enabled{};
        }
        ///USART1 Clock Signal Enable.
        enum class Usart1cenVal {
            disabled=0x00000000,     ///<Disable USART1 clock on Crossbar 0.
            enabled=0x00000001,     ///<Enable USART1 clock on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,Usart1cenVal> usart1cen{};
        namespace Usart1cenValC{
            constexpr Register::FieldValue<decltype(usart1cen)::Type,Usart1cenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(usart1cen)::Type,Usart1cenVal::enabled> enabled{};
        }
        ///EPCA0 Channel Enable.
        enum class Epca0enVal {
            none=0x00000000,     ///<Disable all EPCA0 channels on Crossbar 0.
            stdCex0=0x00000001,     ///<Enable EPCA0 STD_CEX0 on Crossbar 0.
            stdCex01=0x00000002,     ///<Enable EPCA0 STD_CEX0 and STD_CEX1 on Crossbar 0.
            stdCex02=0x00000003,     ///<Enable EPCA0 STD_CEX0, STD_CEX1, and STD_CEX2 on Crossbar 0.
            stdCex03=0x00000004,     ///<Enable EPCA0 STD_CEX0, STD_CEX1, STD_CEX2, and STD_CEX3 on Crossbar 0.
            stdCex04=0x00000005,     ///<Enable EPCA0 STD_CEX0, STD_CEX1, STD_CEX2, STD_CEX3, and STD_CEX4 on Crossbar 0.
            stdCex05=0x00000006,     ///<Enable EPCA0 STD_CEX0, STD_CEX1, STD_CEX2, STD_CEX3, STD_CEX4, and STD_CEX5 on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(10,8),Register::ReadWriteAccess,Epca0enVal> epca0en{};
        namespace Epca0enValC{
            constexpr Register::FieldValue<decltype(epca0en)::Type,Epca0enVal::none> none{};
            constexpr Register::FieldValue<decltype(epca0en)::Type,Epca0enVal::stdCex0> stdCex0{};
            constexpr Register::FieldValue<decltype(epca0en)::Type,Epca0enVal::stdCex01> stdCex01{};
            constexpr Register::FieldValue<decltype(epca0en)::Type,Epca0enVal::stdCex02> stdCex02{};
            constexpr Register::FieldValue<decltype(epca0en)::Type,Epca0enVal::stdCex03> stdCex03{};
            constexpr Register::FieldValue<decltype(epca0en)::Type,Epca0enVal::stdCex04> stdCex04{};
            constexpr Register::FieldValue<decltype(epca0en)::Type,Epca0enVal::stdCex05> stdCex05{};
        }
        ///PCA0 Channel Enable.
        enum class Pca0enVal {
            none=0x00000000,     ///<Disable all PCA0 channels on Crossbar 0.
            cex0=0x00000001,     ///<Enable PCA0 CEX0 on Crossbar 0.
            cex01=0x00000003,     ///<Enable PCA0 CEX0 and CEX1 on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,14),Register::ReadWriteAccess,Pca0enVal> pca0en{};
        namespace Pca0enValC{
            constexpr Register::FieldValue<decltype(pca0en)::Type,Pca0enVal::none> none{};
            constexpr Register::FieldValue<decltype(pca0en)::Type,Pca0enVal::cex0> cex0{};
            constexpr Register::FieldValue<decltype(pca0en)::Type,Pca0enVal::cex01> cex01{};
        }
        ///PCA1 Channel Enable.
        enum class Pca1enVal {
            none=0x00000000,     ///<Disable all PCA1 channels on Crossbar 0.
            cex0=0x00000001,     ///<Enable PCA1 CEX0 on Crossbar 0.
            cex01=0x00000003,     ///<Enable PCA1 CEX0 and CEX1 on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,Pca1enVal> pca1en{};
        namespace Pca1enValC{
            constexpr Register::FieldValue<decltype(pca1en)::Type,Pca1enVal::none> none{};
            constexpr Register::FieldValue<decltype(pca1en)::Type,Pca1enVal::cex0> cex0{};
            constexpr Register::FieldValue<decltype(pca1en)::Type,Pca1enVal::cex01> cex01{};
        }
        ///EPCA0 ECI Enable.
        enum class Eeci0enVal {
            disabled=0x00000000,     ///<Disable EPCA0 ECI on Crossbar 0.
            enabled=0x00000001,     ///<Enable EPCA0 ECI on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(18,18),Register::ReadWriteAccess,Eeci0enVal> eeci0en{};
        namespace Eeci0enValC{
            constexpr Register::FieldValue<decltype(eeci0en)::Type,Eeci0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(eeci0en)::Type,Eeci0enVal::enabled> enabled{};
        }
        ///PCA0 ECI Enable.
        enum class Eci0enVal {
            disabled=0x00000000,     ///<Disable PCA0 ECI on Crossbar 0.
            enabled=0x00000001,     ///<Enable PCA0 ECI on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(19,19),Register::ReadWriteAccess,Eci0enVal> eci0en{};
        namespace Eci0enValC{
            constexpr Register::FieldValue<decltype(eci0en)::Type,Eci0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(eci0en)::Type,Eci0enVal::enabled> enabled{};
        }
        ///PCA1 ECI Enable.
        enum class Eci1enVal {
            disabled=0x00000000,     ///<Disable PCA1 ECI on Crossbar 0.
            enabled=0x00000001,     ///<Enable PCA1 ECI on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(20,20),Register::ReadWriteAccess,Eci1enVal> eci1en{};
        namespace Eci1enValC{
            constexpr Register::FieldValue<decltype(eci1en)::Type,Eci1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(eci1en)::Type,Eci1enVal::enabled> enabled{};
        }
        ///I2S0 TX Enable.
        enum class I2s0txenVal {
            disabled=0x00000000,     ///<Disable I2S0 TX on Crossbar 0.
            enabled=0x00000001,     ///<Enable I2S0 TX on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,21),Register::ReadWriteAccess,I2s0txenVal> i2s0txen{};
        namespace I2s0txenValC{
            constexpr Register::FieldValue<decltype(i2s0txen)::Type,I2s0txenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(i2s0txen)::Type,I2s0txenVal::enabled> enabled{};
        }
        ///I2C0 Enable.
        enum class I2c0enVal {
            disabled=0x00000000,     ///<Disable I2C0 SDA and SCL on Crossbar 0.
            enabled=0x00000001,     ///<Enable I2C0 SDA and SCL on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(22,22),Register::ReadWriteAccess,I2c0enVal> i2c0en{};
        namespace I2c0enValC{
            constexpr Register::FieldValue<decltype(i2c0en)::Type,I2c0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(i2c0en)::Type,I2c0enVal::enabled> enabled{};
        }
        ///Comparator 0 Synchronous Output (CMP0S) Enable.
        enum class Cmp0senVal {
            disabled=0x00000000,     ///<Disable Comparator 0 Synchronous Output (CMP0S) on Crossbar 0.
            enabled=0x00000001,     ///<Enable Comparator 0 Synchronous Output (CMP0S) on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(23,23),Register::ReadWriteAccess,Cmp0senVal> cmp0sen{};
        namespace Cmp0senValC{
            constexpr Register::FieldValue<decltype(cmp0sen)::Type,Cmp0senVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(cmp0sen)::Type,Cmp0senVal::enabled> enabled{};
        }
        ///Comparator 0 Asynchronous Output (CMP0A) Enable.
        enum class Cmp0aenVal {
            disabled=0x00000000,     ///<Disable Comparator 0 Asynchronous Output (CMP0A) on Crossbar 0.
            enabled=0x00000001,     ///<Enable Comparator 0 Asynchronous Output (CMP0A) on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(24,24),Register::ReadWriteAccess,Cmp0aenVal> cmp0aen{};
        namespace Cmp0aenValC{
            constexpr Register::FieldValue<decltype(cmp0aen)::Type,Cmp0aenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(cmp0aen)::Type,Cmp0aenVal::enabled> enabled{};
        }
        ///Comparator 1 Synchronous Output (CMP1S) Enable.
        enum class Cmp1senVal {
            disabled=0x00000000,     ///<Disable Comparator 1 Synchronous Output (CMP1S) on Crossbar 0.
            enabled=0x00000001,     ///<Enable Comparator 1 Synchronous Output (CMP1S) on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,25),Register::ReadWriteAccess,Cmp1senVal> cmp1sen{};
        namespace Cmp1senValC{
            constexpr Register::FieldValue<decltype(cmp1sen)::Type,Cmp1senVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(cmp1sen)::Type,Cmp1senVal::enabled> enabled{};
        }
        ///Comparator 1 Asynchronous Output (CMP1A) Enable.
        enum class Cmp1aenVal {
            disabled=0x00000000,     ///<Disable Comparator 1 Asynchronous Output (CMP1A) on Crossbar 0.
            enabled=0x00000001,     ///<Enable Comparator 1 Asynchronous Output (CMP1A) on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(26,26),Register::ReadWriteAccess,Cmp1aenVal> cmp1aen{};
        namespace Cmp1aenValC{
            constexpr Register::FieldValue<decltype(cmp1aen)::Type,Cmp1aenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(cmp1aen)::Type,Cmp1aenVal::enabled> enabled{};
        }
        ///TIMER0 T0CT Enable.
        enum class Tmr0ctenVal {
            disabled=0x00000000,     ///<Disable TIMER0 CT on Crossbar 0.
            enabled=0x00000001,     ///<Enable TIMER0 CT on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(27,27),Register::ReadWriteAccess,Tmr0ctenVal> tmr0cten{};
        namespace Tmr0ctenValC{
            constexpr Register::FieldValue<decltype(tmr0cten)::Type,Tmr0ctenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(tmr0cten)::Type,Tmr0ctenVal::enabled> enabled{};
        }
        ///TIMER0 T0EX Enable.
        enum class Tmr0exenVal {
            disabled=0x00000000,     ///<Disable TIMER0 EX on Crossbar 0.
            enabled=0x00000001,     ///<Enable TIMER0 EX on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(28,28),Register::ReadWriteAccess,Tmr0exenVal> tmr0exen{};
        namespace Tmr0exenValC{
            constexpr Register::FieldValue<decltype(tmr0exen)::Type,Tmr0exenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(tmr0exen)::Type,Tmr0exenVal::enabled> enabled{};
        }
        ///TIMER1 T1CT Enable.
        enum class Tmr1ctenVal {
            disabled=0x00000000,     ///<Disable TIMER1 CT on Crossbar 0.
            enabled=0x00000001,     ///<Enable TIMER1 CT on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,29),Register::ReadWriteAccess,Tmr1ctenVal> tmr1cten{};
        namespace Tmr1ctenValC{
            constexpr Register::FieldValue<decltype(tmr1cten)::Type,Tmr1ctenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(tmr1cten)::Type,Tmr1ctenVal::enabled> enabled{};
        }
        ///TIMER1 T1EX Enable.
        enum class Tmr1exenVal {
            disabled=0x00000000,     ///<Disable TIMER1 EX on Crossbar 0.
            enabled=0x00000001,     ///<Enable TIMER1 EX on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(30,30),Register::ReadWriteAccess,Tmr1exenVal> tmr1exen{};
        namespace Tmr1exenValC{
            constexpr Register::FieldValue<decltype(tmr1exen)::Type,Tmr1exenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(tmr1exen)::Type,Tmr1exenVal::enabled> enabled{};
        }
    }
    namespace Pbcfg0Xbar0h{    ///<Crossbar 0 Control (High)
        using Addr = Register::Address<0x4002a030,0x7fffff00,0x00000000,unsigned>;
        ///UART0 Enable.
        enum class Uart0enVal {
            disabled=0x00000000,     ///<Disable UART0 RX and TX on Crossbar 0.
            enabled=0x00000001,     ///<Enable UART0 RX and TX on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,Uart0enVal> uart0en{};
        namespace Uart0enValC{
            constexpr Register::FieldValue<decltype(uart0en)::Type,Uart0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(uart0en)::Type,Uart0enVal::enabled> enabled{};
        }
        ///UART0 Flow Control Enable.
        enum class Uart0fcenVal {
            disabled=0x00000000,     ///<Disable UART0 flow control on Crossbar 0.
            enabled=0x00000001,     ///<Enable UART0 flow control on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,Uart0fcenVal> uart0fcen{};
        namespace Uart0fcenValC{
            constexpr Register::FieldValue<decltype(uart0fcen)::Type,Uart0fcenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(uart0fcen)::Type,Uart0fcenVal::enabled> enabled{};
        }
        ///UART1 Enable.
        enum class Uart1enVal {
            disabled=0x00000000,     ///<Disable UART1 RX and TX on Crossbar 0.
            enabled=0x00000001,     ///<Enable UART1 RX and TX on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,Uart1enVal> uart1en{};
        namespace Uart1enValC{
            constexpr Register::FieldValue<decltype(uart1en)::Type,Uart1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(uart1en)::Type,Uart1enVal::enabled> enabled{};
        }
        ///SPI1 Enable.
        enum class Spi1enVal {
            disabled=0x00000000,     ///<Disable SPI1 SCK, MISO, and MOSI on Crossbar 0.
            enabled=0x00000001,     ///<Enable SPI1 SCK, MISO, and MOSI on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::ReadWriteAccess,Spi1enVal> spi1en{};
        namespace Spi1enValC{
            constexpr Register::FieldValue<decltype(spi1en)::Type,Spi1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi1en)::Type,Spi1enVal::enabled> enabled{};
        }
        ///SPI1 NSS Pin Enable.
        enum class Spi1nssenVal {
            disabled=0x00000000,     ///<Disable SPI1 NSS on Crossbar 0.
            enabled=0x00000001,     ///<Enable SPI1 NSS on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::ReadWriteAccess,Spi1nssenVal> spi1nssen{};
        namespace Spi1nssenValC{
            constexpr Register::FieldValue<decltype(spi1nssen)::Type,Spi1nssenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi1nssen)::Type,Spi1nssenVal::enabled> enabled{};
        }
        ///SPI2 Enable.
        enum class Spi2enVal {
            disabled=0x00000000,     ///<Disable SPI2 SCK, MISO, and MOSI on Crossbar 0.
            enabled=0x00000001,     ///<Enable SPI2 SCK, MISO, and MOSI on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::ReadWriteAccess,Spi2enVal> spi2en{};
        namespace Spi2enValC{
            constexpr Register::FieldValue<decltype(spi2en)::Type,Spi2enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi2en)::Type,Spi2enVal::enabled> enabled{};
        }
        ///SPI2 NSS Pin Enable.
        enum class Spi2nssenVal {
            disabled=0x00000000,     ///<Disable SPI2 NSS on Crossbar 0.
            enabled=0x00000001,     ///<Enable SPI2 NSS on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,6),Register::ReadWriteAccess,Spi2nssenVal> spi2nssen{};
        namespace Spi2nssenValC{
            constexpr Register::FieldValue<decltype(spi2nssen)::Type,Spi2nssenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi2nssen)::Type,Spi2nssenVal::enabled> enabled{};
        }
        ///AHB Clock Output Enable.
        enum class AhbenVal {
            disabled=0x00000000,     ///<Disable the AHB Clock / 16 output on Crossbar 0.
            enabled=0x00000001,     ///<Enable the AHB Clock / 16 output on Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,AhbenVal> ahben{};
        namespace AhbenValC{
            constexpr Register::FieldValue<decltype(ahben)::Type,AhbenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(ahben)::Type,AhbenVal::enabled> enabled{};
        }
        ///Crossbar 0 Enable.
        enum class Xbar0enVal {
            disabled=0x00000000,     ///<Disable Crossbar 0.
            enabled=0x00000001,     ///<Enable Crossbar 0.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,31),Register::ReadWriteAccess,Xbar0enVal> xbar0en{};
        namespace Xbar0enValC{
            constexpr Register::FieldValue<decltype(xbar0en)::Type,Xbar0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(xbar0en)::Type,Xbar0enVal::enabled> enabled{};
        }
    }
    namespace Pbcfg0Xbar1{    ///<Crossbar 1 Control
        using Addr = Register::Address<0x4002a040,0x7fc40000,0x00000000,unsigned>;
        ///SSG0 Enable.
        enum class Ssg0enVal {
            none=0x00000000,     ///<Disable all SSG0 channels on Crossbar 1.
            ex0=0x00000001,     ///<Enable SSG0 EX0 on Crossbar 1.
            ex01=0x00000002,     ///<Enable SSG0 EX0 and EX1 on Crossbar 1.
            ex03=0x00000003,     ///<Enable SSG0 EX0, EX1, EX2, and EX3 on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,Ssg0enVal> ssg0en{};
        namespace Ssg0enValC{
            constexpr Register::FieldValue<decltype(ssg0en)::Type,Ssg0enVal::none> none{};
            constexpr Register::FieldValue<decltype(ssg0en)::Type,Ssg0enVal::ex0> ex0{};
            constexpr Register::FieldValue<decltype(ssg0en)::Type,Ssg0enVal::ex01> ex01{};
            constexpr Register::FieldValue<decltype(ssg0en)::Type,Ssg0enVal::ex03> ex03{};
        }
        ///Comparator 0 Synchronous Output (CMP0S) Enable.
        enum class Cmp0senVal {
            disabled=0x00000000,     ///<Disable Comparator 0 Synchronous Output (CMP0S) on Crossbar 1.
            enabled=0x00000001,     ///<Enable Comparator 0 Synchronous Output (CMP0S) on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,Cmp0senVal> cmp0sen{};
        namespace Cmp0senValC{
            constexpr Register::FieldValue<decltype(cmp0sen)::Type,Cmp0senVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(cmp0sen)::Type,Cmp0senVal::enabled> enabled{};
        }
        ///Comparator 1 Synchronous Output (CMP1S) Enable.
        enum class Cmp1senVal {
            disabled=0x00000000,     ///<Disable Comparator 1 Synchronous Output (CMP1S) on Crossbar 1.
            enabled=0x00000001,     ///<Enable Comparator 1 Synchronous Output (CMP1S) on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::ReadWriteAccess,Cmp1senVal> cmp1sen{};
        namespace Cmp1senValC{
            constexpr Register::FieldValue<decltype(cmp1sen)::Type,Cmp1senVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(cmp1sen)::Type,Cmp1senVal::enabled> enabled{};
        }
        ///SPI1 Enable.
        enum class Spi1enVal {
            disabled=0x00000000,     ///<Disable SPI1 SCK, MISO, and MOSI on Crossbar 1.
            enabled=0x00000001,     ///<Enable SPI1 SCK, MISO, and MOSI on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::ReadWriteAccess,Spi1enVal> spi1en{};
        namespace Spi1enValC{
            constexpr Register::FieldValue<decltype(spi1en)::Type,Spi1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi1en)::Type,Spi1enVal::enabled> enabled{};
        }
        ///SPI1 NSS Pin Enable.
        enum class Spi1nssenVal {
            disabled=0x00000000,     ///<Disable SPI1 NSS on Crossbar 1.
            enabled=0x00000001,     ///<Enable SPI1 NSS on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::ReadWriteAccess,Spi1nssenVal> spi1nssen{};
        namespace Spi1nssenValC{
            constexpr Register::FieldValue<decltype(spi1nssen)::Type,Spi1nssenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi1nssen)::Type,Spi1nssenVal::enabled> enabled{};
        }
        ///RTC0 Output Enable.
        enum class Rtc0enVal {
            disabled=0x00000000,     ///<Disable RTC0 Output on Crossbar 1.
            enabled=0x00000001,     ///<Enable RTC0 Output on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,6),Register::ReadWriteAccess,Rtc0enVal> rtc0en{};
        namespace Rtc0enValC{
            constexpr Register::FieldValue<decltype(rtc0en)::Type,Rtc0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(rtc0en)::Type,Rtc0enVal::enabled> enabled{};
        }
        ///SPI2 Enable.
        enum class Spi2enVal {
            disabled=0x00000000,     ///<Disable SPI2 SCK, MISO, and MOSI on Crossbar 1.
            enabled=0x00000001,     ///<Enable SPI2 SCK, MISO, and MOSI on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,Spi2enVal> spi2en{};
        namespace Spi2enValC{
            constexpr Register::FieldValue<decltype(spi2en)::Type,Spi2enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi2en)::Type,Spi2enVal::enabled> enabled{};
        }
        ///SPI2 NSS Pin Enable.
        enum class Spi2nssenVal {
            disabled=0x00000000,     ///<Disable SPI2 NSS on Crossbar 1.
            enabled=0x00000001,     ///<Enable SPI2 NSS on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,8),Register::ReadWriteAccess,Spi2nssenVal> spi2nssen{};
        namespace Spi2nssenValC{
            constexpr Register::FieldValue<decltype(spi2nssen)::Type,Spi2nssenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(spi2nssen)::Type,Spi2nssenVal::enabled> enabled{};
        }
        ///USART1 Enable.
        enum class Usart1enVal {
            disabled=0x00000000,     ///<Disable USART1 RX and TX on Crossbar 1.
            enabled=0x00000001,     ///<Enable USART1 RX and TX on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,9),Register::ReadWriteAccess,Usart1enVal> usart1en{};
        namespace Usart1enValC{
            constexpr Register::FieldValue<decltype(usart1en)::Type,Usart1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(usart1en)::Type,Usart1enVal::enabled> enabled{};
        }
        ///USART1 Flow Control Enable.
        enum class Usart1fcenVal {
            disabled=0x00000000,     ///<Disable USART1 flow control on Crossbar 1.
            enabled=0x00000001,     ///<Enable USART1 flow control on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(10,10),Register::ReadWriteAccess,Usart1fcenVal> usart1fcen{};
        namespace Usart1fcenValC{
            constexpr Register::FieldValue<decltype(usart1fcen)::Type,Usart1fcenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(usart1fcen)::Type,Usart1fcenVal::enabled> enabled{};
        }
        ///USART1 Clock Signal Enable.
        enum class Usart1cenVal {
            disabled=0x00000000,     ///<Disable USART1 clock on Crossbar 1.
            enabled=0x00000001,     ///<Enable USART1 clock on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,11),Register::ReadWriteAccess,Usart1cenVal> usart1cen{};
        namespace Usart1cenValC{
            constexpr Register::FieldValue<decltype(usart1cen)::Type,Usart1cenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(usart1cen)::Type,Usart1cenVal::enabled> enabled{};
        }
        ///UART0 Enable.
        enum class Uart0enVal {
            disabled=0x00000000,     ///<Disable UART0 RX and TX on Crossbar 1.
            enabled=0x00000001,     ///<Enable UART0 RX and TX on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,12),Register::ReadWriteAccess,Uart0enVal> uart0en{};
        namespace Uart0enValC{
            constexpr Register::FieldValue<decltype(uart0en)::Type,Uart0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(uart0en)::Type,Uart0enVal::enabled> enabled{};
        }
        ///UART0 Flow Control Enable.
        enum class Uart0fcenVal {
            disabled=0x00000000,     ///<Disable UART0 flow control on Crossbar 1.
            enabled=0x00000001,     ///<Enable UART0 flow control on Crossbar1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,13),Register::ReadWriteAccess,Uart0fcenVal> uart0fcen{};
        namespace Uart0fcenValC{
            constexpr Register::FieldValue<decltype(uart0fcen)::Type,Uart0fcenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(uart0fcen)::Type,Uart0fcenVal::enabled> enabled{};
        }
        ///I2S0 TX Enable.
        enum class I2s0txenVal {
            disabled=0x00000000,     ///<Disable I2S0 TX on Crossbar 1.
            enabled=0x00000001,     ///<Enable I2S0 TX on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,14),Register::ReadWriteAccess,I2s0txenVal> i2s0txen{};
        namespace I2s0txenValC{
            constexpr Register::FieldValue<decltype(i2s0txen)::Type,I2s0txenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(i2s0txen)::Type,I2s0txenVal::enabled> enabled{};
        }
        ///I2C0 Enable.
        enum class I2c0enVal {
            disabled=0x00000000,     ///<Disable I2C0 SDA and SCL on Crossbar 1.
            enabled=0x00000001,     ///<Enable I2C0 SDA and SCL on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,15),Register::ReadWriteAccess,I2c0enVal> i2c0en{};
        namespace I2c0enValC{
            constexpr Register::FieldValue<decltype(i2c0en)::Type,I2c0enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(i2c0en)::Type,I2c0enVal::enabled> enabled{};
        }
        ///UART1 Enable.
        enum class Uart1enVal {
            disabled=0x00000000,     ///<Disable UART1 RX and TX on Crossbar 1.
            enabled=0x00000001,     ///<Enable UART1 RX and TX on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(16,16),Register::ReadWriteAccess,Uart1enVal> uart1en{};
        namespace Uart1enValC{
            constexpr Register::FieldValue<decltype(uart1en)::Type,Uart1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(uart1en)::Type,Uart1enVal::enabled> enabled{};
        }
        ///I2S0 RX Enable.
        enum class I2s0rxenVal {
            disabled=0x00000000,     ///<Disable I2S0 RX on Crossbar 1.
            enabled=0x00000001,     ///<Enable I2S0 RX on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,17),Register::ReadWriteAccess,I2s0rxenVal> i2s0rxen{};
        namespace I2s0rxenValC{
            constexpr Register::FieldValue<decltype(i2s0rxen)::Type,I2s0rxenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(i2s0rxen)::Type,I2s0rxenVal::enabled> enabled{};
        }
        ///LPTIMER0 Output Enable.
        enum class Lpt0oenVal {
            disabled=0x00000000,     ///<Disable LPTIMER0 Output on Crossbar 1.
            enabled=0x00000001,     ///<Enable LPTIMER0 Output on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(19,19),Register::ReadWriteAccess,Lpt0oenVal> lpt0oen{};
        namespace Lpt0oenValC{
            constexpr Register::FieldValue<decltype(lpt0oen)::Type,Lpt0oenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(lpt0oen)::Type,Lpt0oenVal::enabled> enabled{};
        }
        ///I2C1 Enable.
        enum class I2c1enVal {
            disabled=0x00000000,     ///<Disable I2C1 SDA and SCL on Crossbar 1.
            enabled=0x00000001,     ///<Enable I2C1 SDA and SCL on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(20,20),Register::ReadWriteAccess,I2c1enVal> i2c1en{};
        namespace I2c1enValC{
            constexpr Register::FieldValue<decltype(i2c1en)::Type,I2c1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(i2c1en)::Type,I2c1enVal::enabled> enabled{};
        }
        ///High Drive Kill Pin Enable.
        enum class KillhdenVal {
            disabled=0x00000000,     ///<Disable the PB High Drive Kill Pin on Crossbar 1.
            enabled=0x00000001,     ///<Enable the PB High Drive Kill Pin on Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,21),Register::ReadWriteAccess,KillhdenVal> killhden{};
        namespace KillhdenValC{
            constexpr Register::FieldValue<decltype(killhden)::Type,KillhdenVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(killhden)::Type,KillhdenVal::enabled> enabled{};
        }
        ///Crossbar 1 Enable.
        enum class Xbar1enVal {
            disabled=0x00000000,     ///<Disable Crossbar 1.
            enabled=0x00000001,     ///<Enable Crossbar 1.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,31),Register::ReadWriteAccess,Xbar1enVal> xbar1en{};
        namespace Xbar1enValC{
            constexpr Register::FieldValue<decltype(xbar1en)::Type,Xbar1enVal::disabled> disabled{};
            constexpr Register::FieldValue<decltype(xbar1en)::Type,Xbar1enVal::enabled> enabled{};
        }
    }
    namespace Pbcfg0Pbkey{    ///<Global Port Key
        using Addr = Register::Address<0x4002a050,0xffffff00,0x00000000,unsigned>;
        ///Port Bank 2, 3, and 4 Key.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,0),Register::ReadWriteAccess,unsigned> key{};
    }
}


text:
module Facts
  module Sles
    module Os
      class Release
        FACT_NAME = 'os.release'
        ALIASES = %w[operatingsystemmajrelease operatingsystemrelease].freeze

        def call_the_resolver
          version = Facter::Resolvers::OsRelease.resolve(:version_id)
          fact_value = build_fact_list(version)

          [Facter::ResolvedFact.new(FACT_NAME, fact_value),
           Facter::ResolvedFact.new(ALIASES.first, fact_value[:major], :legacy),
           Facter::ResolvedFact.new(ALIASES.last, fact_value[:full], :legacy)]
        end

        def build_fact_list(version)
          {
            full: version,
            major: version.split('.').first,
            minor: version.split('.').last
          }
        end
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
package org.onosproject.influxdbmetrics;

import com.codahale.metrics.MetricRegistry;
import com.izettle.metrics.influxdb.InfluxDbHttpSender;
import com.izettle.metrics.influxdb.InfluxDbReporter;
import org.apache.commons.lang.StringUtils;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Modified;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
import org.onlab.metrics.MetricsService;
import org.onlab.util.Tools;
import org.onosproject.cfg.ComponentConfigService;
import org.onosproject.cluster.ClusterService;
import org.onosproject.cluster.ControllerNode;
import org.onosproject.core.CoreService;
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;

import java.util.Dictionary;
import java.util.concurrent.TimeUnit;

import static org.slf4j.LoggerFactory.getLogger;

/**
 * A Metric reporter that reports all metrics value to influxDB server.
 */
@Component(immediate = true)
@Service
public class DefaultInfluxDbMetricsReporter implements InfluxDbMetricsReporter {
    private final Logger log = getLogger(getClass());

    private static final int REPORT_PERIOD = 1;
    private static final TimeUnit REPORT_TIME_UNIT = TimeUnit.MINUTES;

    private static final String DEFAULT_PROTOCOL = "http";
    private static final String DEFAULT_METRIC_NAMES = "default";
    private static final String SEPARATOR = ":";
    private static final int DEFAULT_CONN_TIMEOUT = 1000;
    private static final int DEFAULT_READ_TIMEOUT = 1000;

    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
    protected CoreService coreService;

    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
    protected MetricsService metricsService;

    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
    protected ComponentConfigService cfgService;

    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
    protected ClusterService clusterService;

    @Property(name = "monitorAll", boolValue = true,
            label = "Enable to monitor all of metrics stored in metric registry " +
                    "default is true")
    protected boolean monitorAll = true;

    @Property(name = "metricNames", value = DEFAULT_METRIC_NAMES,
            label = "Names of metric to be monitored in third party monitoring " +
                    "server; default metric names are 'default'")
    protected String metricNames = DEFAULT_METRIC_NAMES;

    protected String address;
    protected int port;
    protected String database;
    protected String username;
    protected String password;

    private InfluxDbReporter influxDbReporter;
    private InfluxDbHttpSender influxDbHttpSender;

    @Activate
    public void activate() {
        cfgService.registerProperties(getClass());
        coreService.registerApplication("org.onosproject.influxdbmetrics");
        metricsService.registerReporter(this);

        startReport();

        log.info("Started");
    }

    @Deactivate
    public void deactivate() {
        cfgService.unregisterProperties(getClass(), false);

        stopReport();
        metricsService.unregisterReporter(this);

        log.info("Stopped");
    }

    @Modified
    public void modified(ComponentContext context) {
        readComponentConfiguration(context);
        restartReport();
    }

    @Override
    public void startReport() {
        configSender();
        influxDbReporter = buildReporter(influxDbHttpSender);

        try {
            influxDbReporter.start(REPORT_PERIOD, REPORT_TIME_UNIT);
        } catch (Exception e) {
            log.error("Errors during reporting to InfluxDB, msg: {}" + e.getMessage());
        }
        log.info("Start to report metrics to influxDB.");
    }

    @Override
    public void stopReport() {
        influxDbReporter.stop();
        influxDbHttpSender = null;
        influxDbReporter = null;
        log.info("Stop reporting metrics to influxDB.");
    }

    @Override
    public void restartReport() {
        stopReport();
        startReport();
    }

    @Override
    public void notifyMetricsChange() {
        influxDbReporter.stop();
        influxDbReporter = buildReporter(influxDbHttpSender);

        try {
            influxDbReporter.start(REPORT_PERIOD, REPORT_TIME_UNIT);
        } catch (Exception e) {
            log.error("Errors during reporting to InfluxDB, msg: {}" + e.getMessage());
        }

        log.info("Metric registry has been changed, apply changes.");
    }

    @Override
    public void config(String address, int port, String database,
                       String username, String password) {
        this.address = address;
        this.port = port;
        this.database = database;
        this.username = username;
        this.password = password;
    }

    /**
     * Filters the metrics to only include a set of the given metrics.
     *
     * @param metricRegistry original metric registry
     * @return filtered metric registry
     */
    protected MetricRegistry filter(MetricRegistry metricRegistry) {
        if (!monitorAll) {
            final MetricRegistry filtered = new MetricRegistry();
            metricRegistry.getNames().stream().filter(name ->
                    containsName(name, metricNames)).forEach(name ->
                    filtered.register(name, metricRegistry.getMetrics().get(name)));
            return filtered;
        } else {
            return metricRegistry;
        }
    }

    /**
     * Appends node IP prefix to all performance metrics.
     *
     * @param metricRegistry original metric registry
     * @return prefix added metric registry
     */
    protected MetricRegistry addHostPrefix(MetricRegistry metricRegistry) {
        MetricRegistry moddedRegistry = new MetricRegistry();
        ControllerNode node = clusterService.getLocalNode();
        String prefix = node.id().id() + ".";
        metricRegistry.getNames().stream().forEach(name ->
                moddedRegistry.register(prefix + name, metricRegistry.getMetrics().get(name)));

        return moddedRegistry;
    }

    /**
     * Looks up whether the metric name contains the given prefix keywords.
     * Note that the keywords are separated with comma as delimiter.
     *
     * @param full the original metric name that to be compared with
     * @param prefixes the prefix keywords that are matched against with the metric name
     * @return boolean value that denotes whether the metric name starts with the given prefix
     */
    protected boolean containsName(String full, String prefixes) {
        String[] prefixArray = StringUtils.split(prefixes, ",");
        for (String prefix : prefixArray) {
            if (StringUtils.startsWith(full, StringUtils.trimToEmpty(prefix))) {
                return true;
            }
        }
        return false;
    }

    /**
     * Extracts properties from the component configuration context.
     *
     * @param context the component context
     */
    private void readComponentConfiguration(ComponentContext context) {
        Dictionary<?, ?> properties = context.getProperties();

        String metricNameStr = Tools.get(properties, "metricNames");
        metricNames = metricNameStr != null ? metricNameStr : DEFAULT_METRIC_NAMES;
        log.info("Configured. Metric name is {}", metricNames);

        Boolean monitorAllEnabled = Tools.isPropertyEnabled(properties, "monitorAll");
        if (monitorAllEnabled == null) {
            log.info("Monitor all metrics is not configured, " +
                    "using current value of {}", monitorAll);
        } else {
            monitorAll = monitorAllEnabled;
            log.info("Configured. Monitor all metrics is {}",
                    monitorAll ? "enabled" : "disabled");
        }
    }

    /**
     * Configures parameters for sender.
     */
    private void configSender() {
        try {
            influxDbHttpSender = new InfluxDbHttpSender(DEFAULT_PROTOCOL, address,
                    port, database, username + SEPARATOR + password, REPORT_TIME_UNIT,
                    DEFAULT_CONN_TIMEOUT, DEFAULT_READ_TIMEOUT);
        } catch (Exception e) {
            log.error("Fail to connect to given influxDB server!");
        }
    }

    /**
     * Builds reporter with the given sender.
     *
     * @param sender sender
     * @return reporter
     */
    private InfluxDbReporter buildReporter(InfluxDbHttpSender sender) {
        MetricRegistry mr = metricsService.getMetricRegistry();
        return InfluxDbReporter.forRegistry(addHostPrefix(filter(mr)))
                .convertRatesTo(TimeUnit.SECONDS)
                .convertDurationsTo(TimeUnit.MILLISECONDS)
                .build(sender);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    >
    <include layout="@layout/app_bar"
        android:id="@+id/app_bar"/>

    <ListView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/tollyteaser_list">

    </ListView>

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="10dp"
        android:visibility="gone"
        android:id="@+id/text"
        android:text="We are unable to fetch data due to internet connection !"/>
</LinearLayout>

    <fragment
        android:id="@+id/fragment_navigation_drawer"
        android:name="com.scienstechnologies.tollyteaser.navigationdrawer.FragmentDrawer"
        android:layout_width="@dimen/nav_drawer_width"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:layout_marginTop="?android:attr/actionBarSize"
        app:layout="@layout/fragment_navigation_drawer"
        tools:layout="@layout/fragment_navigation_drawer" />
    </android.support.v4.widget.DrawerLayout>


text:
--TEST--
Test stripos() function : usage variations - unexpected inputs for 'offset' argument
--FILE--
<?php
/* Prototype  : int stripos ( string $haystack, string $needle [, int $offset] );
 * Description: Find position of first occurrence of a case-insensitive string
 * Source code: ext/standard/string.c
*/

/* Test stripos() function with unexpected inputs for 'offset' argument */

echo "*** Testing stripos() function with unexpected values for offset ***\n";

// get an unset variable
$unset_var = 'string_val';
unset($unset_var);

// defining a class
class sample  {
  public function __toString() {
    return "object";
  }
}

//getting the resource
$file_handle = fopen(__FILE__, "r");

//definition of input args
$haystack = "hello world";
$needle = "world";

// array with different values
$offsets =  array (

  // float values
  1.5,
  -1.5,
  1.5e10,
  1.6E-10,
  .5,

  // array values
  array(),
  array(0),
  array(1),
  array(1, 2),
  array('color' => 'red', 'item' => 'pen'),

  // boolean values
  true,
  false,
  TRUE,
  FALSE,

  // objects
  new sample(),

  // empty string
  "",
  '',

  // null vlaues
  NULL,
  null,

  //resource
  $file_handle,

  // undefined variable
  @$undefined_var,

  // unset variable
  @$unset_var
);

// loop through each element of the array and check the working of stripos()
$counter = 1;
for($index = 0; $index < count($offsets); $index ++) {
  echo "-- Iteration $counter --\n";
  var_dump( stripos($haystack, $needle, $offsets[$index]) );
  $counter ++;
}

echo "*** Done ***";
?>
--EXPECTF--
*** Testing stripos() function with unexpected values for offset ***
-- Iteration 1 --
int(6)
-- Iteration 2 --

Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 3 --

Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 4 --
int(6)
-- Iteration 5 --
int(6)
-- Iteration 6 --

Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
NULL
-- Iteration 7 --

Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
NULL
-- Iteration 8 --

Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
NULL
-- Iteration 9 --

Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
NULL
-- Iteration 10 --

Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
NULL
-- Iteration 11 --
int(6)
-- Iteration 12 --
int(6)
-- Iteration 13 --
int(6)
-- Iteration 14 --
int(6)
-- Iteration 15 --

Warning: stripos() expects parameter 3 to be long, object given in %s on line %d
NULL
-- Iteration 16 --

Warning: stripos() expects parameter 3 to be long, string given in %s on line %d
NULL
-- Iteration 17 --

Warning: stripos() expects parameter 3 to be long, string given in %s on line %d
NULL
-- Iteration 18 --
int(6)
-- Iteration 19 --
int(6)
-- Iteration 20 --

Warning: stripos() expects parameter 3 to be long, resource given in %s on line %d
NULL
-- Iteration 21 --
int(6)
-- Iteration 22 --
int(6)
*** Done ***


text:
doctype html
html(lang="en")
  head
    title= pageTitle
    script(type='text/javascript').
  body
    h1 Trails
    #container.col
      p.
        A Modern MVC Framework for Node.js


text:
package net.aetherial.books.webexporter;

import java.util.*;

@SuppressWarnings("unchecked")
public class AuthorComparator implements Comparator
{
	public String getCompareString (String original)
	{
		String newString = "" + original.toLowerCase ();

		String[] seperators = {";", ",", "/", " [", "]"};

		for (int i = 0; i < seperators.length; i++)
		{
			String seperator = seperators[i];

			int index = newString.indexOf (seperator);

			if (index != -1)
				newString = newString.substring(0, index);
		}

		int index = newString.lastIndexOf (" ");

		if (index != -1)
			newString = newString.substring (index + 1);

		return newString.trim ();
	}

	public int compare (Object one, Object two)
	{
		return this.getCompareString (one.toString ()).compareTo (this.getCompareString (two.toString ()));
	}
}


text:
from django.db import models
from model_utils.models import TimeStampedModel

class CaseArchived(TimeStampedModel):
    full_name = models.TextField(null=True, blank=True)
    date_of_birth = models.DateField(null=True, blank=True)
    postcode = models.CharField(max_length=12, blank=True, null=True)
    laa_reference = models.BigIntegerField(null=True, blank=True, unique=True, editable=False)

    specialist_referred_to = models.TextField(null=True, blank=True)
    date_specialist_referred = models.DateTimeField(null=True, blank=True)
    date_specialist_closed = models.DateTimeField(null=True, blank=True)

    knowledgebase_items_used = models.TextField(null=True, blank=True)
    area_of_law = models.TextField(null=True, blank=True)
    in_scope = models.NullBooleanField(null=True, blank=True)
    financially_eligible = models.NullBooleanField(null=True, blank=True)

    outcome_code = models.TextField(null=True, blank=True)
    outcome_code_date = models.DateTimeField(null=True, blank=True)
    search_field = models.TextField(null=True, blank=True)


text:
// Author: jmaessen@google.com (Jan Maessen)
// Author: morlovich@google.com (Maksim Orlovich)

#include "net/instaweb/rewriter/public/javascript_code_block.h"

#include <cstddef>

#include "net/instaweb/rewriter/public/javascript_library_identification.h"
#include "pagespeed/kernel/base/message_handler.h"
#include "pagespeed/kernel/base/source_map.h"
#include "pagespeed/kernel/base/statistics.h"
#include "pagespeed/kernel/base/string.h"
#include "pagespeed/kernel/base/string_util.h"
#include "pagespeed/kernel/js/js_minify.h"
#include "pagespeed/kernel/js/js_tokenizer.h"

namespace net_instaweb {

// Statistics names
const char JavascriptRewriteConfig::kBlocksMinified[] =
    "javascript_blocks_minified";
const char JavascriptRewriteConfig::kLibrariesIdentified[] =
    "javascript_libraries_identified";
const char JavascriptRewriteConfig::kMinificationFailures[] =
    "javascript_minification_failures";
const char JavascriptRewriteConfig::kTotalBytesSaved[] =
    "javascript_total_bytes_saved";
const char JavascriptRewriteConfig::kTotalOriginalBytes[] =
    "javascript_total_original_bytes";
const char JavascriptRewriteConfig::kMinifyUses[] = "javascript_minify_uses";
const char JavascriptRewriteConfig::kNumReducingMinifications[] =
    "javascript_reducing_minifications";

const char JavascriptRewriteConfig::kJSMinificationDisabled[] =
    "javascript_minification_disabled";
const char JavascriptRewriteConfig::kJSDidNotShrink[] =
    "javascript_did_not_shrink";
const char JavascriptRewriteConfig::kJSFailedToWrite[] =
    "javascript_failed_to_write";

const char JavascriptCodeBlock::kIntrospectionComment[] =
    "This script contains introspective JavaScript and is unsafe to replace.";

JavascriptRewriteConfig::JavascriptRewriteConfig(
    Statistics* stats, bool minify, bool use_experimental_minifier,
    const JavascriptLibraryIdentification* identification,
    const pagespeed::js::JsTokenizerPatterns* js_tokenizer_patterns)
    : minify_(minify),
      use_experimental_minifier_(use_experimental_minifier),
      library_identification_(identification),
      js_tokenizer_patterns_(js_tokenizer_patterns),
      blocks_minified_(stats->GetVariable(kBlocksMinified)),
      libraries_identified_(stats->GetVariable(kLibrariesIdentified)),
      minification_failures_(stats->GetVariable(kMinificationFailures)),
      total_bytes_saved_(stats->GetVariable(kTotalBytesSaved)),
      total_original_bytes_(stats->GetVariable(kTotalOriginalBytes)),
      num_uses_(stats->GetVariable(kMinifyUses)),
      num_reducing_minifications_(
          stats->GetVariable(kNumReducingMinifications)),
      minification_disabled_(stats->GetVariable(kJSMinificationDisabled)),
      did_not_shrink_(stats->GetVariable(kJSDidNotShrink)),
      failed_to_write_(stats->GetVariable(kJSFailedToWrite)) {
}

void JavascriptRewriteConfig::InitStats(Statistics* statistics) {
  statistics->AddVariable(kBlocksMinified);
  statistics->AddVariable(kLibrariesIdentified);
  statistics->AddVariable(kMinificationFailures);
  statistics->AddVariable(kTotalBytesSaved);
  statistics->AddVariable(kTotalOriginalBytes);
  statistics->AddVariable(kMinifyUses);
  statistics->AddVariable(kNumReducingMinifications);

  statistics->AddVariable(kJSMinificationDisabled);
  statistics->AddVariable(kJSDidNotShrink);
  statistics->AddVariable(kJSFailedToWrite);
}

JavascriptCodeBlock::JavascriptCodeBlock(
    const StringPiece& original_code, JavascriptRewriteConfig* config,
    const StringPiece& message_id, MessageHandler* handler)
    : config_(config),
      message_id_(message_id.data(), message_id.size()),
      original_code_(original_code.data(), original_code.size()),
      rewritten_(false),
      successfully_rewritten_(false),
      handler_(handler) {
}

JavascriptCodeBlock::~JavascriptCodeBlock() { }

// Is this URL sanitary to be appended (in a line comment) to the JS doc?
bool JavascriptCodeBlock::IsSanitarySourceMapUrl(StringPiece url) {
  for (int i = 0, n = url.size(); i < n; ++i) {
    if (!IsNonControlAscii(url[i])) {
      // This is a bit broader than necessary. JS line comments can only be
      // terminated by Unicode line/paragraph separators (Zl/Zp). Instead of
      // searching for all of these, we simply check any non-standard chars.
      // Specifically, we reject any URL with control chars (0x00-0x1F,0x7F)
      // or any non-ASCII UTF-8 chars (Bytes 0x80-0xFF).
      // Because URLs passed in here are .pagespeed. rewritten URLs, we do
      // not expect any of them to be of this form anyway, so this case
      // shouldn't be hit.
      return false;
    }
  }
  return true;
}

void JavascriptCodeBlock::AppendSourceMapUrl(StringPiece url) {
  DCHECK(rewritten_);
  DCHECK(successfully_rewritten_);
  if (!IsSanitarySourceMapUrl(url)) {
    LOG(DFATAL) << "Unsanitary source map URL could not be added to JS " << url;
    return;
  }

  StrAppend(&rewritten_code_, "\n//# sourceMappingURL=", url, "\n");
}

StringPiece JavascriptCodeBlock::ComputeJavascriptLibrary() const {
  // TODO(jmaessen): when we compute minified version and find
  // a match, consider adding the un-minified hash to the library
  // identifier, and then using that to speed up identification
  // in future (at the cost of a double lookup for a miss).  Also
  // consider pruning candidate JS that is simply too small to match
  // a registered library.
  DCHECK(rewritten_);
  StringPiece result;
  if (rewritten_) {
    const JavascriptLibraryIdentification* library_identification =
        config_->library_identification();
    if (library_identification != NULL) {
      result = library_identification->Find(rewritten_code_);
      if (!result.empty()) {
        config_->libraries_identified()->Add(1);
      }
    }
  }
  return result;
}

bool JavascriptCodeBlock::UnsafeToRename(const StringPiece& script) {
  // If you're pulling out script elements it's probably because
  // you're trying to do a kind of reflection that would break if we
  // minified the code and mutated its url.
  return script.find("document.getElementsByTagName('script')")
           != StringPiece::npos ||
         script.find("document.getElementsByTagName(\"script\")")
           != StringPiece::npos ||
         script.find("$('script')")  // jquery version
           != StringPiece::npos ||
         script.find("$(\"script\")")
           != StringPiece::npos;
}

bool JavascriptCodeBlock::Rewrite() {
  DCHECK(!rewritten_);
  if (rewritten_) {
    return successfully_rewritten_;
  }

  rewritten_ = true;
  successfully_rewritten_ = false;
  // We minify for two reasons: because the user wants minified js code (in
  // which case output_code_ should point to the minified code when we're
  // done), or because we're trying to identify a javascript library.
  // Bail if we're not doing one of these things.
  if (!config_->minify() && (config_->library_identification() == NULL)) {
    return successfully_rewritten_;
  }

  if (MinifyJs(original_code_, &rewritten_code_, &source_mappings_)) {
    // Minification succeeded. The fact that it succeeded doesn't imply that
    // it actually saved anything; we increment num_reducing_uses when there
    // were actual savings.
    config_->blocks_minified()->Add(1);
    if (config_->minify() && rewritten_code_.size() < original_code_.size()) {
      // Minification will actually be used.
      successfully_rewritten_ = true;
      config_->num_reducing_uses()->Add(1);
      config_->total_original_bytes()->Add(original_code_.size());
      // Note: This unsigned arithmetic is guaranteed not to underflow because
      // of the if statement above.
      config_->total_bytes_saved()->Add(
          original_code_.size() - rewritten_code_.size());
    }
  } else {  // Minification failed.
    handler_->Message(kInfo, "%s: Javascript minification failed.  "
                      "Preserving old code.", message_id_.c_str());
    // Note: Although we set rewritten_code_, we do not consider this a
    // successful rewrite and thus will not minify. This is only used for
    // canonical library identification.
    TrimWhitespace(original_code_, &rewritten_code_);
    // Update stats.
    config_->minification_failures()->Add(1);
  }
  return successfully_rewritten_;
}

void JavascriptCodeBlock::SwapRewrittenString(GoogleString* other) {
  DCHECK(rewritten_);
  DCHECK(successfully_rewritten_);

  other->swap(rewritten_code_);

  rewritten_code_.clear();
  rewritten_ = false;
  successfully_rewritten_ = false;
}

bool JavascriptCodeBlock::MinifyJs(
    StringPiece input, GoogleString* output,
    source_map::MappingVector* source_mappings) {
  if (config_->use_experimental_minifier()) {
    return pagespeed::js::MinifyUtf8JsWithSourceMap(
        config_->js_tokenizer_patterns(), input, output, source_mappings);
  } else {
    return pagespeed::js::MinifyJs(input, output);
  }
}

}  // namespace net_instaweb


text:
package org.apereo.cas.authentication;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Getter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;

/**
 * This is {@link AuthenticationPolicyExecutionResult}.
 *
 * @author Misagh Moayyed
 * @since 6.4.0
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
@Getter
@SuperBuilder
@ToString
public class AuthenticationPolicyExecutionResult implements Serializable {
    @Serial
    private static final long serialVersionUID = -6607624825058147653L;

    private final boolean success;

    /**
     * Failure authentication policy.
     *
     * @return the authentication policy execution result
     */
    public static AuthenticationPolicyExecutionResult failure() {
        return AuthenticationPolicyExecutionResult.builder().success(false).build();
    }

    /**
     * Success authentication policy via a condition.
     *
     * @param condition the condition
     * @return the authentication policy execution result
     */
    public static AuthenticationPolicyExecutionResult success(final boolean condition) {
        return AuthenticationPolicyExecutionResult.builder().success(condition).build();
    }

    /**
     * Success authentication policy.
     *
     * @return the authentication policy execution result
     */
    public static AuthenticationPolicyExecutionResult success() {
        return success(true);
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Easyuino: Easyuino::DistanceMeterNonBlock Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Easyuino
    1.2.0

Public Member Functions |
Protected Member Functions |
List of all members

Easyuino::DistanceMeterNonBlock Class Reference

DistanceMeterNonBlock offers an API to interact with an Ultrasonic Module to measure distance in a non-block way.
 More...

#include <DistanceMeterNonBlock.h>

Inheritance diagram for Easyuino::DistanceMeterNonBlock:

  <map id="Easyuino::DistanceMeterNonBlock_map" name="Easyuino::DistanceMeterNonBlock_map">
<area href="class_easyuino_1_1_distance_meter.html" title="Used to represent the at least supported Ultrasonic Module models enum UltrasonicModule : uint8_t { H..." alt="Easyuino::DistanceMeter" shape="rect" coords="0,56,206,80"/>
<area href="class_easyuino_1_1_device.html" title="General class that provides the common API behaviour for all the devices/sensors. ..." alt="Easyuino::Device" shape="rect" coords="0,0,206,24"/>
<area href="class_easyuino_1_1_distance_meter_accurate.html" title="DistanceMeterAccurate offers an API to interact with an Ultrasonic Module to measure distances consid..." alt="Easyuino::DistanceMeterAccurate" shape="rect" coords="0,168,206,192"/>
</map>

Public Member Functions

 	DistanceMeterNonBlock (IN uint8_t triggerPin, IN uint8_t echoPin)

 	Constructor.  More...

 	DistanceMeterNonBlock (IN uint8_t triggerEchoPin)

 	Contructor used with Ultrasonic Modules that have only one pin for trigger and echo.  More...

 	~DistanceMeterNonBlock ()

 	Destructor.

bool 	begin ()

 	Used to put the device ready to receive requests.  More...

void 	end ()

 	Used to stop the device API.  More...

float 	getDistanceCentimeters ()

 	Gets the last value that the API measured using the Ultrasonic Module.  More...

void 	updateDistance ()

 	Updates the distance of the Ultrasonic Module to the objects in a blocking way.  More...

virtual void 	updateDistanceNonBlock ()

 	Updates the distance of the Ultrasonic Module to the objects in a non-blocking way.  More...

 Public Member Functions inherited from Easyuino::DistanceMeter

 	DistanceMeter (IN uint8_t triggerPin, IN uint8_t echoPin)

 	Constructor.  More...

 	DistanceMeter (IN uint8_t triggerEchoPin)

 	Contructor used with Ultrasonic Modules that have only one pin for trigger and echo.  More...

 	~DistanceMeter ()

 	Destructor.

float 	getDistanceInches ()

 	Gets the last value that the API measured using the US.  More...

 Public Member Functions inherited from Easyuino::Device

 	Device ()

 	Constructor called by every sub-classes.

 	~Device ()

 	Destroy all the resources associated with the device.

bool 	isInitialized () const

 	Verify is the device is initialized and ready to use.  More...

Protected Member Functions

void 	executeUpdateDistanceNonBlock ()

 	Execute a non-block distance measurement.

bool 	isUpdateDistanceNonBlockTimeout ()

 	Verify if there is a non-block measuremenet on going that has already timeouted.  More...

float 	calculateDistance (IN float soundSpeedCmPerSec)

 	Calculates the distance to the object based on the sound speed in air using the last distance value measured!  More...

 Protected Member Functions inherited from Easyuino::DistanceMeter

float 	executeUpdateDistanceBlock (IN float soundSpeed)

 	Execute a block distance measurement and calculates the distance based on the sound speed.  More...

Additional Inherited Members

 Protected Attributes inherited from Easyuino::DistanceMeter

uint8_t 	_triggerPin

 	Arduino pin used to trigger the echo wave emission.

uint8_t 	_echoPin

 	Arduino pin that is set to LOW by when reflected echo wave arrives.

volatile bool 	_isEchoing

 	Used to know if it is in a middle of a measurement.

volatile float 	_distance

 	It contains a cached value of the last distance measured.  More...

 Protected Attributes inherited from Easyuino::Device

bool 	_isInitialized

 	Used to know if the device API is initialized and ready to receive requests.

Detailed Description

DistanceMeterNonBlock offers an API to interact with an Ultrasonic Module to measure distance in a non-block way.

It offers a the same as DistanceMeter API plus updateDistanceNonBlock() that allows your application code run while the distance is calculated in "background" without stopping your program.

See also

Limitation: This allows ONLY 2 instances of DistanceMeterNonBlock per sketch!!

Limitation: The accuracy of the non-block method is much smaller because it uses interruption mechanism

Devices Supported: HC-SR03, HC-SR04, HC-SR05

Devices Tested: HC-SR04

Constructor & Destructor Documentation

◆ DistanceMeterNonBlock() [1/2]

          Easyuino::DistanceMeterNonBlock::DistanceMeterNonBlock
          (
          IN uint8_t
          triggerPin,

          IN uint8_t
          echoPin

          )

Constructor.

Parameters

triggerPin	Arduino pin connected to the trigger pin of the Ultrasonic Module

echoPin	Arduino pin connected to the echo pin of the Ultrasonic Module

◆ DistanceMeterNonBlock() [2/2]

          Easyuino::DistanceMeterNonBlock::DistanceMeterNonBlock
          (
          IN uint8_t
          triggerEchoPin	)

Contructor used with Ultrasonic Modules that have only one pin for trigger and echo.

Parameters

triggerEchoPin	Arduino pin connected to the trigger&echo pin of the Ultrasonic Module

Member Function Documentation

◆ begin()

          bool Easyuino::DistanceMeterNonBlock::begin
          (
          	)

virtual

Used to put the device ready to receive requests.

Normally this have some default behaviour some devices have other overload method with same name that receives other arguments to device customization.

Returns

True: If the device was initialized. False: Otherwise.

Reimplemented from Easyuino::DistanceMeter.

◆ calculateDistance()

          float Easyuino::DistanceMeterNonBlock::calculateDistance
          (
          IN float
          soundSpeedCmPerSec	)

protected

Calculates the distance to the object based on the sound speed in air using the last distance value measured!

Parameters

soundSpeedCmPerSec	(Cm/Sec) The sound speed to be taken in account during the calculation

Returns

distance (Centimeters) The new calculated distance

◆ end()

          void Easyuino::DistanceMeterNonBlock::end
          (
          	)

virtual

Used to stop the device API.

After this the the device will not process API requests.

Reimplemented from Easyuino::DistanceMeter.

◆ getDistanceCentimeters()

          float Easyuino::DistanceMeterNonBlock::getDistanceCentimeters
          (
          	)

virtual

Gets the last value that the API measured using the Ultrasonic Module.

Returns

distance (Centimeters) The most recent measurement the API have done

Reimplemented from Easyuino::DistanceMeter.

◆ isUpdateDistanceNonBlockTimeout()

          bool Easyuino::DistanceMeterNonBlock::isUpdateDistanceNonBlockTimeout
          (
          	)

protected

Verify if there is a non-block measuremenet on going that has already timeouted.

Returns

True: If it timeout. False: Otherwise.

◆ updateDistance()

          void Easyuino::DistanceMeterNonBlock::updateDistance
          (
          	)

virtual

Updates the distance of the Ultrasonic Module to the objects in a blocking way.

The new distance value is available using getDistanceCentimeters() or getDistanceInches() method after calling this method.

Warning

This method blocks while the measurement is on going, so the arduino waits for the measure to be concluded, if you want a non block update distance method look for DistanceMeterNonBlock API

Reimplemented from Easyuino::DistanceMeter.

◆ updateDistanceNonBlock()

          virtual void Easyuino::DistanceMeterNonBlock::updateDistanceNonBlock
          (
          	)

virtual

Updates the distance of the Ultrasonic Module to the objects in a non-blocking way.

This means that the call to the method will return immediatly and in the "background" the distance measure will ocurr after a while. When the measurement is concluded and you call getDistanceCentimeters() or getDistanceInches() the new distance value will be returned. While the measurement is on going the distance will be from the last measurement.

The documentation for this class was generated from the following file:

src/DistanceMeterNonBlock.h

Easyuino

DistanceMeterNonBlock

Generated by

     1.8.13


text:
require File.expand_path("../../helpers", __FILE__)

class ParserAlternation < Test::Unit::TestCase

  def setup
    @root = RP.parse('(ab??|cd*|ef+)*|(gh|ij|kl)?')
  end

  def test_parse_alternation_root
    e = @root.expressions[0]
    assert_equal( true,   e.is_a?(Alternation) )
  end

  def test_parse_alternation_alts
    alts = @root.expressions[0].alternatives

    assert_equal( true,   alts[0].is_a?(Alternative) )
    assert_equal( true,   alts[1].is_a?(Alternative) )

    assert_equal( true,   alts[0][0].is_a?(Group::Capture) )
    assert_equal( true,   alts[1][0].is_a?(Group::Capture) )

    assert_equal( 2,      alts.length )
  end

  def test_parse_alternation_nested
    e = @root[0].alternatives[0][0][0]

    assert_equal( true,   e.is_a?(Alternation) )
  end

  def test_parse_alternation_nested_sequence
    alts    = @root.expressions[0][0]
    nested  = alts.expressions[0][0][0]

    assert_equal( true,   nested.is_a?(Alternative) )

    assert_equal( true,   nested.expressions[0].is_a?(Literal) )
    assert_equal( true,   nested.expressions[1].is_a?(Literal) )
    assert_equal( 2,      nested.expressions.length )
  end

  def test_parse_alternation_nested_groups
    root = RP.parse('(i|ey|([ougfd]+)|(ney))')

    alts = root.expressions[0][0].alternatives
    assert_equal( 4,  alts.length )
  end

  def test_parse_alternation_grouped_alts
    root = RP.parse('ca((n)|(t)|(ll)|(b))')

    alts = root.expressions[1][0].alternatives

    assert_equal( 4,  alts.length )
    assert_equal( true,   alts[0].is_a?(Alternative) )
    assert_equal( true,   alts[1].is_a?(Alternative) )
    assert_equal( true,   alts[2].is_a?(Alternative) )
    assert_equal( true,   alts[3].is_a?(Alternative) )
  end

  def test_parse_alternation_nested_grouped_alts
    root = RP.parse('ca((n|t)|(ll|b))')

    alts = root.expressions[1][0].alternatives

    assert_equal( 2,  alts.length )
    assert_equal( true,   alts[0].is_a?(Alternative) )
    assert_equal( true,   alts[1].is_a?(Alternative) )

    subalts = root.expressions[1][0][0][0][0].alternatives

    assert_equal( 2,  alts.length )
    assert_equal( true,   subalts[0].is_a?(Alternative) )
    assert_equal( true,   subalts[1].is_a?(Alternative) )
  end

  def test_parse_alternation_continues_after_nesting
    root = RP.parse(/a|(b)c/)

    seq = root.expressions[0][1].expressions

    assert_equal( 2,  seq.length )

    assert_equal( true,   seq[0].is_a?(Group::Capture) )
    assert_equal( true,   seq[1].is_a?(Literal) )
  end

end


text:
import DS from 'ember-data';

export default DS.Model.extend({
  majorVersion: DS.attr('number'),
  minorVersion: DS.attr('number'),
  maintVersion: DS.attr('number'),

  fullVersion: function() {
    return this.get('majorVersion') + "." + this.get('minorVersion') + "." + this.get('maintVersion');
  }.property('majorVersion', 'minorVersion', 'maintVersion')
});


text:
package guardgate

import (
	"bytes"
	"crypto/x509"
	"encoding/json"
	"errors"
	"io/ioutil"
	"net/http"
	"reflect"
	"testing"

	spec "knative.dev/security-guard/pkg/apis/guard/v1alpha1"
)

const testCert = `
-----BEGIN CERTIFICATE-----
MIICtDCCAZwCCQDzpJfrosIDzzANBgkqhkiG9w0BAQsFADAcMRowGAYDVQQDDBFz
ZWN1cml0eS1ndWFyZC1jYTAeFw0yMjEwMjcxMzA0MzFaFw0zMjEwMjQxMzA0MzFa
MBwxGjAYBgNVBAMMEXNlY3VyaXR5LWd1YXJkLWNhMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAnhNCuciY7qUqzskkBkZxe9zGJRtKONVof94oAT+nzilS
BBrs3zuHcI8v3qBQk63Hdj8xGw860A1fliKkO15iaC6QCRevVCUQ+pypIgRFY4Hj
S7ryLGStLjqXvBH/zaxio5Sz4+yAxwChsnlqvyGqNUTjzxh82s1Y6wN7Vmjn2Pfe
zNP2us/QhTqenBUYEsl16wPHwa62ZB4sP78yuRWeNkot2rq9qtC1DmgZl8u9wmcF
D+IYME0Ihqqm4VhmnK9fmqt4ozuGBSL3Cs3+Xu8t3et+riAYkVKbXUQWqoKiSven
PNJI8wRj2S6gZLCS7Z7zW3nlnKI4qKQijlNvjzw3tQIDAQABMA0GCSqGSIb3DQEB
CwUAA4IBAQBbdn4zo2p3dAH2qIdaap92sgT/A7D0ciX4bworVQwCHVPKRtWZlI4x
Wrlo/+VQFJ7YBJgpqJf//kTiWJ6ZHCxETpJrJ2X+48oxB6DNnx14+ykI10LSYmiJ
2aCs1vkrgzcp0+qXTRLNQBnNnMmmghsTgxkCwRvwAn1+KupJeFj7y8Jxxbp9cWLy
CNyW8U4UpaeAqRgzAHzjyodt4S1zxxpQJ5FSaxSL05OJtDodgokImhgJAoTNJVqZ
T30ny2EMCCPdmZfEpITjZrNl2rT2GY47AYBk44LWvKRDvrkiKzcpDxVJ7ggUrWyE
W+ve1pVd/1brFQJi1dF1J+QwhjCv7K1x
-----END CERTIFICATE-----`

type fakeKmgr struct{}

func (f *fakeKmgr) InitConfigs() {}

func (f *fakeKmgr) Read(ns string, sid string, isCm bool) (*spec.GuardianSpec, error) {
	return new(spec.GuardianSpec), nil
}

func (f *fakeKmgr) Create(ns string, sid string, isCm bool, guardianSpec *spec.GuardianSpec) error {
	return nil
}

func (f *fakeKmgr) Set(ns string, sid string, isCm bool, guardianSpec *spec.GuardianSpec) error {
	return nil
}

func (f *fakeKmgr) GetGuardian(ns string, sid string, cm bool, autoActivate bool) *spec.GuardianSpec {
	return new(spec.GuardianSpec)
}

func (f *fakeKmgr) Watch(ns string, cmFlag bool, set func(ns string, sid string, cmFlag bool, g *spec.GuardianSpec)) {
}

func (f *fakeKmgr) TokenData(token string, labels []string) (sid string, ns string, err error) {
	return "mysid", "myns", nil
}

type fakeHttpClient struct {
	statusCode int
	json       []byte
	err        error
	fail       bool
	count      int
}

func fakeClient(statusCode int, response string) (*gateClient, *fakeHttpClient) {
	srv := NewGateClient("url", "x", "x", false)
	client := &fakeHttpClient{statusCode: statusCode, json: []byte(response)}
	srv.httpClient = client
	srv.clearPile()
	srv.kubeMgr = &fakeKmgr{}
	return srv, client
}
func (hc *fakeHttpClient) ReadToken(audience string) {

}

func (hc *fakeHttpClient) Do(req *http.Request) (*http.Response, error) {
	hc.count++

	if hc.fail {
		return &http.Response{StatusCode: hc.statusCode, Body: nil}, hc.err

	}
	// create a new reader with that JSON
	r := ioutil.NopCloser(bytes.NewReader(hc.json))
	return &http.Response{StatusCode: hc.statusCode, Body: r}, hc.err
}

func Test_guardClient_reportPile(t *testing.T) {
	t.Run("simple", func(t *testing.T) {
		srv, client := fakeClient(http.StatusOK, "Problem in request")

		srv.reportPile()
		if client.count != 0 {
			t.Error("Expected no request")
		}

		srv.addToPile(new(spec.SessionDataProfile))
		srv.addToPile(new(spec.SessionDataProfile))
		srv.reportPile()
		if client.count != 1 {
			t.Error("Expected no request")
		}

		srv.addToPile(new(spec.SessionDataProfile))
		srv.addToPile(new(spec.SessionDataProfile))

		client = &fakeHttpClient{statusCode: http.StatusBadRequest, json: []byte("Problem in request")}
		srv.httpClient = client
		srv.reportPile()
		if client.count != 1 {
			t.Error("Expected request")
		}

		srv.pile.Count = 1
		srv.httpClient = &fakeHttpClient{statusCode: http.StatusBadRequest, json: []byte("Problem in request"), err: errors.New("Wow")}
		srv.reportPile()
		if client.count != 1 {
			t.Error("Expected request")
		}
		srv.pile.Count = 1
		client = &fakeHttpClient{fail: true}
		srv.httpClient = client
		srv.reportPile()
		if client.count != 1 {
			t.Error("Expected request")
		}
	})

}

func Test_guardClient_loadGuardian(t *testing.T) {

	t.Run("simple", func(t *testing.T) {
		srv, _ := fakeClient(0, "")
		g := new(spec.GuardianSpec)

		if got := srv.loadGuardian(); !reflect.DeepEqual(got, g) {
			t.Errorf("guardClient.loadGuardian() = %v, want %v", got, g)
		}

		j, _ := json.Marshal(new(spec.GuardianSpec))
		srv.httpClient = &fakeHttpClient{statusCode: http.StatusOK, json: j}
		srv.clearPile()
		srv.kubeMgr = &fakeKmgr{}
		g = new(spec.GuardianSpec)

		if got := srv.loadGuardian(); !reflect.DeepEqual(got, g) {
			t.Errorf("guardClient.loadGuardian() = %v, want %v", got, g)
		}
	})
}

func Test_gateClient_initHttpClient(t *testing.T) {
	t.Run("base", func(t *testing.T) {
		srv := &gateClient{
			sid:     "mysid",
			ns:      "myns",
			useCm:   false,
			kubeMgr: &fakeKmgr{},
		}
		srv.initHttpClient(x509.NewCertPool())
	})
}